test/unit/assocations_test.rb in pluginaweek-enumerate_by-0.4.2 vs test/unit/assocations_test.rb in pluginaweek-enumerate_by-0.4.3

- old
+ new

@@ -21,10 +21,15 @@ @car.color = @green assert_equal @green, @car.color end def test_should_use_nil_if_enumeration_does_not_exist - @car.color = 'blue' + assert_nothing_raised { @car.color = 'blue' } + assert_nil @car.color + end + + def test_should_allow_nil + assert_nothing_raised { @car.color = nil } assert_nil @car.color end def test_should_track_associations expected = {'color_id' => 'color'}