diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 17:18:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 17:18:37 -0700 |
commit | 4fcd1622ba6f9a2a44301bffcb7f5aee0d5db605 (patch) | |
tree | acce9e30e3da62cb06d89a0a272af0fd71e96028 /spec/algebra | |
parent | 4781d510da928862b2dd3eac3f9363eda321e60c (diff) | |
download | rails-4fcd1622ba6f9a2a44301bffcb7f5aee0d5db605.tar.gz rails-4fcd1622ba6f9a2a44301bffcb7f5aee0d5db605.tar.bz2 rails-4fcd1622ba6f9a2a44301bffcb7f5aee0d5db605.zip |
separating test code from implementation code
Diffstat (limited to 'spec/algebra')
-rw-r--r-- | spec/algebra/unit/relations/relation_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb index 1219f80bc3..07a7dcb843 100644 --- a/spec/algebra/unit/relations/relation_spec.rb +++ b/spec/algebra/unit/relations/relation_spec.rb @@ -122,7 +122,10 @@ module Arel describe '#order' do it "manufactures an order relation" do - @relation.order(@attribute1, @attribute2).should == Order.new(@relation, [@attribute1, @attribute2]) + order = @relation.order(@attribute1, @attribute2) + order.relation.should == @relation + order.orderings.should == [@attribute1, @attribute2] + order.should be_kind_of Order end describe 'when given a blank ordering' do |