aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/algebra/unit/relations/relation_spec.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-27 14:37:11 -0700
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 15:46:19 -0400
commit20b28b441b651d0404d64049253898c061a039be (patch)
tree4b9a8fc9e8f9207017248f129550c0283b0f520b /spec/arel/algebra/unit/relations/relation_spec.rb
parent2fe585328d6a24df310d3e60059c9c7b05b64bac (diff)
downloadrails-20b28b441b651d0404d64049253898c061a039be.tar.gz
rails-20b28b441b651d0404d64049253898c061a039be.tar.bz2
rails-20b28b441b651d0404d64049253898c061a039be.zip
using in memory relations as results from sql relation
Conflicts: lib/arel/algebra/primitives/expression.rb lib/arel/algebra/relations/relation.rb
Diffstat (limited to 'spec/arel/algebra/unit/relations/relation_spec.rb')
-rw-r--r--spec/arel/algebra/unit/relations/relation_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/arel/algebra/unit/relations/relation_spec.rb b/spec/arel/algebra/unit/relations/relation_spec.rb
index 3286f373f5..9707f2887c 100644
--- a/spec/arel/algebra/unit/relations/relation_spec.rb
+++ b/spec/arel/algebra/unit/relations/relation_spec.rb
@@ -40,7 +40,7 @@ module Arel
describe "when given a string" do
it "manufactures a join operation with the string passed through" do
- @relation.join(arbitrary_string = "ASDF").should == Join.new(arbitrary_string, @relation)
+ @relation.join(arbitrary_string = "ASDF").should == StringJoin.new(@relation, arbitrary_string)
end
end
@@ -159,7 +159,7 @@ module Arel
describe '#insert' do
it 'manufactures an insertion relation' do
Session.start do
- record = {@relation[:name] => 'carl'}
+ record = { @relation[:name] => 'carl' }
mock(Session.new).create(Insert.new(@relation, record))
@relation.insert(record)
end
@@ -169,7 +169,7 @@ module Arel
describe '#update' do
it 'manufactures an update relation' do
Session.start do
- assignments = {@relation[:name] => Value.new('bob', @relation)}
+ assignments = { @relation[:name] => Value.new('bob', @relation) }
mock(Session.new).update(Update.new(@relation, assignments))
@relation.update(assignments)
end
@@ -180,8 +180,8 @@ module Arel
describe Relation::Enumerable do
it "implements enumerable" do
- @relation.collect.should == @relation.session.read(@relation)
- @relation.first.should == @relation.session.read(@relation).first
+ @relation.collect.should == @relation.session.read(@relation).collect
+ @relation.first.should == @relation.session.read(@relation).first
end
end
end