Sha256: 8af6cd2c4e78ffb402aa3318bac981fddc7a9c9b4244af74f136cd50870ae2f2

Contents?: true

Size: 942 Bytes

Versions: 1

Compression:

Stored size: 942 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axle_attributes-1.13.2 test/lib/null_definition_test.rb