Merge branch 'master' of github.com:johnbintz/cuke-pack

This commit is contained in:
John Bintz 2012-11-29 06:42:19 -05:00
commit a2cc9c4ca9
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def expect_fields(object, *fields, &block)
within finder do within finder do
fields.flatten.each do |field| fields.flatten.each do |field|
find(".#{field}").text.should == object.send(field).to_s expect_field field, object.send(field).to_s
end end
block.call(object) if block block.call(object) if block
@ -35,3 +35,6 @@ def expect_fields(object, *fields, &block)
@__expect_stack = nil if @__expect_stack == 0 @__expect_stack = nil if @__expect_stack == 0
end end
def expect_field(field, value)
find(".#{field}").text.should == value
end