aboutsummaryrefslogtreecommitdiffstats
path: root/spec/relations
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-05-21 11:45:12 -0400
committerErnie Miller <ernie@metautonomo.us>2010-05-21 11:45:12 -0400
commit43bfd3fae496a2a859aad0a654a91437357c3450 (patch)
treebd95f3b7add4ba7841a6fa9dd717de9c60ea90a8 /spec/relations
parentd144b8d5af11c819b8f70a97006998bf89ee926c (diff)
downloadrails-43bfd3fae496a2a859aad0a654a91437357c3450.tar.gz
rails-43bfd3fae496a2a859aad0a654a91437357c3450.tar.bz2
rails-43bfd3fae496a2a859aad0a654a91437357c3450.zip
Fix tests to work properly on Ruby 1.9, honor multiple calls to #order in memory engine, and make having clauses behave like where clauses in SQL engine (join with AND, allow multiple calls to having to add predicates)
Diffstat (limited to 'spec/relations')
-rw-r--r--spec/relations/join_spec.rb2
-rw-r--r--spec/relations/relation_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/relations/join_spec.rb b/spec/relations/join_spec.rb
index 3894d175e8..b5ead51053 100644
--- a/spec/relations/join_spec.rb
+++ b/spec/relations/join_spec.rb
@@ -29,7 +29,7 @@ describe "Arel" do
8.times do |i|
thing_id = owner_id * 8 + i
age = 2 * thing_id
- name = "Name#{thing_id}"
+ name = "Name #{thing_id % 6}"
@thing.insert([thing_id, owner_id, name, age])
@expected << Arel::Row.new(@relation, [thing_id, owner_id, name, age, owner_id])
diff --git a/spec/relations/relation_spec.rb b/spec/relations/relation_spec.rb
index 0381f8759d..b5b73e2205 100644
--- a/spec/relations/relation_spec.rb
+++ b/spec/relations/relation_spec.rb
@@ -14,7 +14,7 @@ describe "Arel" do
describe "Relation" do
before :all do
- @expected = (1..20).map { |i| @relation.insert([i, "Name#{i}", 2 * i]) }
+ @expected = (1..20).map { |i| @relation.insert([i, "Name #{i % 6}", 2 * i]) }
end
it_should_behave_like 'A Relation'