spec/spec_helper.rb
# Returns the full path to one of the test files in puzzle-files/{puz-type}. You should be able to
# include or omit puz-type as long as it matches the file extension.
Returns the full path to one of the test files in puzzle-files/{puz-type}. You should be able to
include or omit puz-type as long as it matches the file extension.
Returns the full path to one of the test files in puzzle - files / { puz - type } . You should be able to include or omit puz - type as long as it matches the file extension .
def testfile_path(filename)
    if filename.split('/').first != (ext = filename.split('.').last)
      filename = "#{ext}/#{filename}"
    end
    File.expand_path(filename, TESTFILE_DIR)
  end
def testfile_path ( filename ) if filename . split ( '/' ) . first != ( ext = filename . split ( '.' ) . last ) filename = "#{ext}/#{filename}" end File . expand_path ( filename , TESTFILE_DIR ) end
Returns the full path to one of the test files in puzzle-files/{puz-type}.
Returns the full path to one of the test files in puzzle - files / { puz - type } .
filename