aboutsummaryrefslogtreecommitdiffstats
path: root/spec/relations
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-03-30 15:32:39 -0400
committerErnie Miller <ernie@metautonomo.us>2010-05-07 13:07:21 -0400
commit0433b054eebd5a53ff6c5f35383a6c0aed0015b2 (patch)
treeed07230cd0f1e033138f89e103bb2ce4cb6d6f7a /spec/relations
parent0afcfa27c9f386ca7c190cd1f66db1cdd9971f3b (diff)
downloadrails-0433b054eebd5a53ff6c5f35383a6c0aed0015b2.tar.gz
rails-0433b054eebd5a53ff6c5f35383a6c0aed0015b2.tar.bz2
rails-0433b054eebd5a53ff6c5f35383a6c0aed0015b2.zip
Tests for notmatches and notin, and fixes for issues found in tests
Diffstat (limited to 'spec/relations')
-rw-r--r--spec/relations/join_spec.rb6
-rw-r--r--spec/relations/relation_spec.rb2
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/relations/join_spec.rb b/spec/relations/join_spec.rb
index 47e468a9f9..3894d175e8 100644
--- a/spec/relations/join_spec.rb
+++ b/spec/relations/join_spec.rb
@@ -13,6 +13,7 @@ describe "Arel" do
r.attribute :id, Arel::Attributes::Integer
r.attribute :owner_id, Arel::Attributes::Integer
+ r.attribute :name, Arel::Attributes::String
r.attribute :age, Arel::Attributes::Integer
end
end
@@ -28,9 +29,10 @@ describe "Arel" do
8.times do |i|
thing_id = owner_id * 8 + i
age = 2 * thing_id
+ name = "Name#{thing_id}"
- @thing.insert([thing_id, owner_id, age])
- @expected << Arel::Row.new(@relation, [thing_id, owner_id, age, owner_id])
+ @thing.insert([thing_id, owner_id, name, age])
+ @expected << Arel::Row.new(@relation, [thing_id, owner_id, name, age, owner_id])
end
end
end
diff --git a/spec/relations/relation_spec.rb b/spec/relations/relation_spec.rb
index 808ddf1444..0381f8759d 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, nil, 2 * i]) }
+ @expected = (1..20).map { |i| @relation.insert([i, "Name#{i}", 2 * i]) }
end
it_should_behave_like 'A Relation'