spec/bastet/group_spec.rb in bastet-0.1.1 vs spec/bastet/group_spec.rb in bastet-0.1.2
- old
+ new
@@ -70,7 +70,15 @@
it "should be false for all" do
group = Bastet::Group.new('none') { |entity| false }
group.contains?(mock).should be_false
end
+
+ it "should be false if the object doesn't respond to that criteria" do
+ fake = stub
+ fake.expects(:foo?).raises(NoMethodError)
+
+ group = Bastet::Group.new('foo') { |entity| entity.foo? }
+ group.contains?(fake).should be_false
+ end
end
end