提交 ee6443f2 编写于 作者: A Aaron Patterson

better tests for Taken constructor, removing Take#==

上级 0e957e05
......@@ -7,13 +7,6 @@ def initialize relation, taken
@taken = taken
end
def == other
super ||
Take === other &&
relation == other.relation &&
taken == other.taken
end
def engine
engine = relation.engine
......
......@@ -134,7 +134,9 @@ module Arel
describe '#take' do
it "manufactures a take relation" do
@relation.take(5).should == Take.new(@relation, 5)
take = @relation.take(5)
take.relation.should == @relation
take.taken.should == 5
end
describe 'when given a blank number of items' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册