test/unit/associations/test_proxy.rb in tpitale-mongo_mapper-0.6.9 vs test/unit/associations/test_proxy.rb in tpitale-mongo_mapper-0.6.10
- old
+ new
@@ -51,13 +51,25 @@
end
context "blank?" do
should "be true if blank" do
@blank_proxy.blank?.should be_true
+ @nil_proxy.blank?.should be_true
end
should "be false if not blank" do
@proxy.blank?.should be_false
+ end
+ end
+
+ context "present?" do
+ should "be true if present" do
+ @proxy.present?.should be_true
+ end
+
+ should "be false if not present" do
+ @blank_proxy.present?.should be_false
+ @nil_proxy.present?.should be_false
end
end
should "delegate respond_to? to target" do
@proxy.respond_to?(:each).should be_true
\ No newline at end of file