Sha256: 6c8cd957c0d521f537fbe6007e486a84ea69d2a836589f90c25f671a1ac16620

Contents?: true

Size: 859 Bytes

Versions: 3

Compression:

Stored size: 859 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.row_elements.collect{|row| row.cells}

  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

3 entries across 3 versions & 1 rubygems

Version Path
cucumber_analytics-1.4.2 features/step_definitions/table_steps.rb
cucumber_analytics-1.4.1 features/step_definitions/table_steps.rb
cucumber_analytics-1.4.0 features/step_definitions/table_steps.rb