spec/cucumber/ast/step_collection_spec.rb in aslakhellesoy-cucumber-0.3.11.3 vs spec/cucumber/ast/step_collection_spec.rb in aslakhellesoy-cucumber-0.3.11.5
- old
+ new
@@ -2,13 +2,14 @@
module Cucumber
module Ast
describe StepCollection do
it "should convert And to Given in snippets" do
- c = StepCollection.new([
- Step.new(1, 'Given', 'cukes'),
- Step.new(2, 'And', 'turnips')
- ])
+ s1 = Step.new(1, 'Given', 'cukes')
+ s2 = Step.new(2, 'And', 'turnips')
+ s1.stub!(:language).and_return(Parser::I18n::Language['en'])
+ s2.stub!(:language).and_return(Parser::I18n::Language['en'])
+ c = StepCollection.new([s1, s2])
actual_keywords = c.step_invocations.map{|i| i.actual_keyword}
actual_keywords.should == %w{Given Given}
end
end
end