提交 53db9d80 编写于 作者: A Aaron Patterson

removing test code from implementation

上级 a70455b9
...@@ -10,11 +10,5 @@ def initialize(relation, predicates) ...@@ -10,11 +10,5 @@ def initialize(relation, predicates)
def havings def havings
@havings ||= relation.havings + predicates @havings ||= relation.havings + predicates
end end
def == other
super || Having === other &&
relation == other.relation &&
predicates == other.predicates
end
end end
end end
...@@ -7,13 +7,6 @@ def initialize relation, skipped ...@@ -7,13 +7,6 @@ def initialize relation, skipped
@skipped = skipped @skipped = skipped
end end
def == other
super ||
Skip === other &&
relation == other.relation &&
skipped == other.skipped
end
def eval def eval
unoperated_rows[skipped..-1] unoperated_rows[skipped..-1]
end end
......
...@@ -151,7 +151,10 @@ module Arel ...@@ -151,7 +151,10 @@ module Arel
describe '#skip' do describe '#skip' do
it "manufactures a skip relation" do it "manufactures a skip relation" do
@relation.skip(4).should == Skip.new(@relation, 4) skip = @relation.skip(4)
skip.relation.should == @relation
skip.skipped.should == 4
skip.should be_kind_of Skip
end end
describe 'when given a blank number of items' do 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.
先完成此消息的编辑!
想要评论请 注册