Sha256: 975fcd4dd0cc072ec0b3d472105bf675c03d52334fb5f596779e3e48bfd0478d
Contents?: true
Size: 1.69 KB
Versions: 2
Compression:
Stored size: 1.69 KB
Contents
Then /^(?:the )?(?:feature "([^"]*)" )?(?:test(?: "([^"]*)")? )?(?:step(?: "([^"]*)") )?doc string content type is "([^"]*)"$/ do |file, test, step, type| file ||= 1 test ||= 1 step ||= 1 expected = type actual = @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block.content_type assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end Then /^(?:the )?(?:feature "([^"]*)" )?(?:test(?: "([^"]*)")? )?(?:step(?: "([^"]*)") )?doc string has no content type$/ do |file, test, step| file ||= 1 test ||= 1 step ||= 1 expected = nil actual = @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block.content_type assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end Then /^(?:the )?(?:feature "([^"]*)" )?(?:test(?: "([^"]*)")? )?(?:step(?: "([^"]*)") )?doc string has the following contents:$/ do |file, test, step, contents| file ||= 1 test ||= 1 step ||= 1 expected = contents.raw.flatten.collect do |cell_value| if cell_value.start_with? "'" cell_value.slice(1..cell_value.length - 2) else cell_value end end actual = @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block.contents assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end Then /^(?:the )?(?:feature "([^"]*)" )?(?:test(?: "([^"]*)")? )?(?:step(?: "([^"]*)") )?doc string contents are empty$/ do |file, test, step| file ||= 1 test ||= 1 step ||= 1 expected = [] actual = @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block.contents assert(actual == expected, "Expected: #{expected}\n but was: #{actual}") end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber_analytics-1.1.1 | features/step_definitions/doc_string_steps.rb |
cucumber_analytics-1.0.0 | features/step_definitions/doc_string_steps.rb |