Sha256: 945dd370f3c7ea14a0ebc900f04097f853bcf46aaac332eb43c363e4b7e72a49

Contents?: true

Size: 830 Bytes

Versions: 2

Compression:

Stored size: 830 Bytes

Contents

Then /^(?:the )?(?:feature "([^"]*)" )?(?:test(?: "([^"]*)")? )?(?:step(?: "([^"]*)") )?table has the following contents:$/ do |file, test, step, contents|
  file ||= 1
  test ||= 1
  step ||= 1

  expected = contents.raw
  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(?: "([^"]*)") )?table correctly stores its underlying implementation$/ do |file, test, step|
  file ||= 1
  test ||= 1
  step ||= 1

  raw_element = @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block.raw_element

  raw_element.is_a?(Array).should be_true
  raw_element.each { |row| row.has_key?('cells').should be_true }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber_analytics-1.3.0 features/step_definitions/table_steps.rb
cucumber_analytics-1.2.0 features/step_definitions/table_steps.rb