require 'helper' class AxleAttributes::NullDefinitionTest < ActiveSupport::TestCase test "reports the given name" do assert_equal 'somename', AxleAttributes::NullDefinition.new(Business, 'somename').name end test "has a null type" do assert_equal :null, AxleAttributes::NullDefinition.new(Business, 'whatzit').type end test "equality" do definition1 = AxleAttributes::NullDefinition.new(Business, 'attr') definition2 = AxleAttributes::NullDefinition.new(Business, 'attr') assert_equal definition1, definition2 # definition1 = AxleAttributes::NullDefinition.new(Business, 'attr') # definition2 = AxleAttributes::NullDefinition.new(Contact, 'attr') # assert_not_equal definition1, definition2 definition1 = AxleAttributes::NullDefinition.new(Business, 'attr') definition2 = AxleAttributes::NullDefinition.new(Business, 'different') assert_not_equal definition1, definition2 end end