Sha256: 69d07f4780636f485d7079b82b6839a2098c8b44035897b6f43f8607865c6651

Contents?: true

Size: 579 Bytes

Versions: 16

Compression:

Stored size: 579 Bytes

Contents

require File.expand_path('../abstract_unit', __FILE__)

class TestEqual < ActiveSupport::TestCase
  fixtures :capitols

  def test_new
    assert_not_equal(Capitol.new, Capitol.new)
  end

  def test_same_new
    it = Capitol.new
    assert_equal(it, it)
  end

  def test_same
    first = Capitol.find(['Canada', 'Ottawa'])
    second = Capitol.find(['Canada', 'Ottawa'])
    assert_equal(first, second)
  end

  def test_different
    first = Capitol.find(['Mexico', 'Mexico City'])
    second = Capitol.find(['Canada', 'Ottawa'])
    assert_not_equal(first, second)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.0 test/test_equal.rb
composite_primary_keys-7.0.13 test/test_equal.rb
composite_primary_keys-8.0.0 test/test_equal.rb
composite_primary_keys-7.0.12 test/test_equal.rb
composite_primary_keys-7.0.11 test/test_equal.rb
composite_primary_keys-7.0.10 test/test_equal.rb
composite_primary_keys-7.0.9 test/test_equal.rb
composite_primary_keys-7.0.8 test/test_equal.rb
composite_primary_keys-7.0.7 test/test_equal.rb
composite_primary_keys-7.0.6 test/test_equal.rb
composite_primary_keys-7.0.5 test/test_equal.rb
composite_primary_keys-7.0.4 test/test_equal.rb
composite_primary_keys-7.0.3 test/test_equal.rb
composite_primary_keys-7.0.2 test/test_equal.rb
composite_primary_keys-7.0.1 test/test_equal.rb
composite_primary_keys-7.0.0 test/test_equal.rb