Sha256: b1bb233380d19f0b66d2e92f4819ee7c286d1d425eeeb8a7e75bb6d37e5aef0b

Contents?: true

Size: 464 Bytes

Versions: 7

Compression:

Stored size: 464 Bytes

Contents

module Minitest
  module Assertions
    # Compares the equality at the attribute level
    def assert_identical expected, actual, msg = nil
      actual = actual.becomes(expected.class) if actual && actual.class != expected.class
      ignored_attributes = %w(id)
      assert_equal expected.class, actual.class
      assert_equal expected.attributes.except(*ignored_attributes),
                   actual.attributes.except(*ignored_attributes)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
forceps-0.6.7 test/support/minitest_ext.rb
forceps-0.6.4 test/support/minitest_ext.rb
forceps-0.6.3 test/support/minitest_ext.rb
forceps-0.6.2 test/support/minitest_ext.rb
forceps-0.6.1 test/support/minitest_ext.rb
forceps-0.6.0 test/support/minitest_ext.rb
forceps-0.5.0 test/support/minitest_ext.rb