lib/aruba/runtime.rb in aruba-0.14.14 vs lib/aruba/runtime.rb in aruba-1.0.0.pre.alpha.1

- old
+ new

@@ -79,15 +79,14 @@ # You might want to overwrite this method to place your data else where. # # @return [ArubaPath] # The directory to where your fixtures are stored def fixtures_directory - @fixtures_directory ||= begin + unless @fixtures_directory candidates = config.fixtures_directories.map { |dir| File.join(root_directory, dir) } - directory = candidates.find { |d| Aruba.platform.directory? d } + @fixtures_directory = candidates.find { |d| Aruba.platform.directory? d } - fail "No existing fixtures directory found in #{candidates.map { |d| format('"%s"', d) }.join(', ')}." unless directory - directory + fail "No existing fixtures directory found in #{candidates.map { |d| format('"%s"', d) }.join(', ')}. " unless @fixtures_directory end fail %(Fixtures directory "#{@fixtures_directory}" is not a directory) unless Aruba.platform.directory?(@fixtures_directory) ArubaPath.new(@fixtures_directory)