diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-05-27 10:08:01 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-05-27 10:08:01 -0300 |
commit | 2dfc72755e57cce0dd9ccbf5d8151e65a83660d8 (patch) | |
tree | dd5915e0feb66a1a99f7d578326fd141f44584ec /spec | |
parent | a158a736c821703682fc89bb83d7990e4618b08c (diff) | |
parent | a9b3581007a3609c21c1093ab3a07bf8d6408031 (diff) | |
download | rails-2dfc72755e57cce0dd9ccbf5d8151e65a83660d8.tar.gz rails-2dfc72755e57cce0dd9ccbf5d8151e65a83660d8.tar.bz2 rails-2dfc72755e57cce0dd9ccbf5d8151e65a83660d8.zip |
Merge remote branch 'ernie/master'
Diffstat (limited to 'spec')
-rw-r--r-- | spec/engines/sql/unit/relations/having_spec.rb | 2 | ||||
-rw-r--r-- | spec/shared/relation_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/engines/sql/unit/relations/having_spec.rb b/spec/engines/sql/unit/relations/having_spec.rb index a7f2f0da96..931e8d0a06 100644 --- a/spec/engines/sql/unit/relations/having_spec.rb +++ b/spec/engines/sql/unit/relations/having_spec.rb @@ -39,7 +39,7 @@ module Arel end end end - + describe 'when given two predicates' do it "manufactures sql with where clause conditions joined by AND" do sql = @relation.group(@relation[:department]).having("MIN(salary) > 1000", "MAX(salary) < 10000").to_sql diff --git a/spec/shared/relation_spec.rb b/spec/shared/relation_spec.rb index d6d0de1da4..a5a22edb7d 100644 --- a/spec/shared/relation_spec.rb +++ b/spec/shared/relation_spec.rb @@ -187,12 +187,12 @@ share_examples_for 'A Relation' do actual.should == @expected.reverse end end - + describe "by two attributes in one call to #order" do before :all do @expected = @expected.sort_by { |e| [e[@relation[:name]], e[@relation[:age]]]}.map {|e| e[@relation[:id]]} end - + it "can be specified as ascending order in one call to #order" do actual = [] @relation.order(@relation[:name].asc, @relation[:age].asc).each { |r| actual << r[@relation[:id]] } |