Sha256: 6f512add5867cd05d2814054c8947eb4e8cdccfdd4b14cca880dd4f98625c981
Contents?: true
Size: 885 Bytes
Versions: 5
Compression:
Stored size: 885 Bytes
Contents
Given /^a scenario "([^\"]*)" that fails once, then passes$/ do |name| write_file "features/#{name}.feature", <<-FEATURE Feature: #{name} Scenario: #{name} Given it fails once, then passes FEATURE write_file "features/step_defnitions/#{name}_steps.rb", <<-STEPS Given(/^it fails once, then passes$/) do $#{name.downcase} ||= 0 $#{name.downcase} += 1 expect($#{name.downcase}).to eql 2 end STEPS end Given /^a scenario "([^\"]*)" that fails twice, then passes$/ do |name| write_file "features/#{name}.feature", <<-FEATURE Feature: #{name} Scenario: #{name} Given it fails twice, then passes FEATURE write_file "features/step_definitions/#{name}_steps.rb", <<-STEPS Given(/^it fails twice, then passes$/) do $#{name.downcase} ||= 0 $#{name.downcase} += 1 expect($#{name.downcase}).to eql 3 end STEPS end
Version data entries
5 entries across 5 versions & 2 rubygems