Sha256: 52c3b623d66642be5b8d3a1d6059c0ad274d05a24e87e1dd3847a72371081a7c
Contents?: true
Size: 1.28 KB
Versions: 7
Compression:
Stored size: 1.28 KB
Contents
Then /^(?:the )?file(?: "([^"]*)")? is found to have the following properties:$/ do |file, properties| file ||= 1 properties = properties.rows_hash properties.each do |property, expected_value| if property == 'path' expected_value.sub!('path_to', @test_directory) end expected = expected_value actual = @parsed_files[file - 1].send(property.to_sym).to_s assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end end When /^(?:the )?file(?: "([^"]*)")? features are as follows:$/ do |file, feature| file ||= 1 expected = feature.raw.flatten.first actual = @parsed_files[file - 1].feature.name assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end When /^(?:the )?file(?: "([^"]*)")? has no features$/ do |file| file ||= 1 assert @parsed_files[file - 1].feature.nil? end Then(/^the feature file has convenient output$/) do @parsed_files.first.method(:to_s).owner.should == CukeModeler::FeatureFile end Given(/^a feature file element based on "([^"]*)"$/) do |file_name| file_path = "#{@default_file_directory}/#{file_name}" File.open(file_path, 'w') { |file| file.puts "Feature:" } unless File.exists?(file_path) @element = CukeModeler::FeatureFile.new(file_path) end
Version data entries
7 entries across 7 versions & 1 rubygems