mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
implementing hash is a non-requirement
This commit is contained in:
parent
ea1d050266
commit
60b8a98c15
2 changed files with 0 additions and 15 deletions
|
@ -73,14 +73,6 @@ module Arel
|
|||
end
|
||||
end
|
||||
|
||||
def eql?(other)
|
||||
self == other
|
||||
end
|
||||
|
||||
def hash
|
||||
@hash ||= :name.hash
|
||||
end
|
||||
|
||||
def column_for(attribute)
|
||||
has_attribute?(attribute) and columns.detect { |c| c.name == attribute.name.to_s }
|
||||
end
|
||||
|
|
|
@ -108,13 +108,6 @@ module Arel
|
|||
end
|
||||
end
|
||||
|
||||
describe 'hashing' do
|
||||
it "implements hash equality" do
|
||||
Table.new(:users).should hash_the_same_as(Table.new(:users))
|
||||
Table.new(:users).should_not hash_the_same_as(Table.new(:photos))
|
||||
end
|
||||
end
|
||||
|
||||
describe '#engine' do
|
||||
it "defaults to global engine" do
|
||||
Table.engine = engine = Sql::Engine.new
|
||||
|
|
Loading…
Reference in a new issue