Remove #=== quirk
Makes it consistent with Relation. Can't see a use for this.
This commit is contained in:
parent
fbf1858ed9
commit
2091e5a65e
|
@ -79,12 +79,6 @@ module ActiveRecord
|
|||
load_target == other
|
||||
end
|
||||
|
||||
# Forwards <tt>===</tt> explicitly to the \target because the instance method
|
||||
# removal above doesn't catch it. Loads the \target if needed.
|
||||
def ===(other)
|
||||
other === load_target
|
||||
end
|
||||
|
||||
def to_ary
|
||||
load_target.dup
|
||||
end
|
||||
|
|
|
@ -123,11 +123,6 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
|
|||
assert active_record.developers.include?(david)
|
||||
end
|
||||
|
||||
def test_triple_equality
|
||||
assert !(Array === Developer.find(1).projects)
|
||||
assert Developer.find(1).projects === Array
|
||||
end
|
||||
|
||||
def test_adding_single
|
||||
jamis = Developer.find(2)
|
||||
jamis.projects.reload # causing the collection to load
|
||||
|
|
|
@ -326,12 +326,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
|
|||
authors(:david).readonly_comments.each { |c| assert c.readonly? }
|
||||
end
|
||||
|
||||
def test_triple_equality
|
||||
# sometimes tests on Oracle fail if ORDER BY is not provided therefore add always :order with :first
|
||||
assert !(Array === Firm.scoped(:order => "id").first.clients)
|
||||
assert Firm.scoped(:order => "id").first.clients === Array
|
||||
end
|
||||
|
||||
def test_finding_default_orders
|
||||
assert_equal "Summit", Firm.scoped(:order => "id").first.clients.first.name
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue