From 9bfbcde3a336579980596bb9e40d75aacf9ad092 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Mon, 1 Nov 2010 10:22:15 -0700 Subject: [PATCH] Fixed specs using Product. --- spec/ast/pattern_spec.rb | 4 ++-- spec/ast/product_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/ast/pattern_spec.rb b/spec/ast/pattern_spec.rb index 91f0cfa..52e8252 100644 --- a/spec/ast/pattern_spec.rb +++ b/spec/ast/pattern_spec.rb @@ -117,7 +117,7 @@ pattern = p1 * 2 pattern.should be_an_instance_of(Pegarus::Product) - pattern.first.should equal(p1) - pattern.second.should == 2 + pattern.pattern.should equal(p1) + pattern.count.should == 2 end end diff --git a/spec/ast/product_spec.rb b/spec/ast/product_spec.rb index a68e351..7c8a50f 100644 --- a/spec/ast/product_spec.rb +++ b/spec/ast/product_spec.rb @@ -3,7 +3,7 @@ describe "Product.new" do it "converts the first input to a pattern" do pattern = Pegarus::Product.new "a", 1 - pattern.first.should be_an_instance_of(Pegarus::Character) + pattern.pattern.should be_an_instance_of(Pegarus::Character) end it "calls #to_int to convert the second input" do @@ -11,7 +11,7 @@ obj.should_receive(:to_int).and_return(2) pattern = Pegarus::Product.new "a", obj - pattern.second.should == 2 + pattern.count.should == 2 end it "raises a TypeError if the second input is nil" do