test/virtualbox/abstract_model/attributable_test.rb in virtualbox-0.5.4 vs test/virtualbox/abstract_model/attributable_test.rb in virtualbox-0.6.0

- old
+ new

@@ -162,11 +162,11 @@ context "reading and writing attributes" do setup do @model = AttributeModel.new @model.populate_attributes({ :foo => "foo", - :bar => "bar" + :bar => false }) @checkstring = "HEY" end @@ -184,9 +184,15 @@ end should "be able to read defined attributes" do assert_nothing_raised { assert_equal "foo", @model.foo + } + end + + should "understand false values" do + assert_nothing_raised { + assert_equal false, @model.bar } end should "raise an error if attempting to write an undefined attribute" do assert_raises(NoMethodError) { @model.baz = @check_string } \ No newline at end of file