aboutsummaryrefslogtreecommitdiffstats
path: root/spec/algebra
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-29 12:01:08 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-29 12:01:08 -0700
commit068b184a59a98b4acdc63a2833c360199d138c1d (patch)
tree2eb628fc6d9ad09938033794739843ed16843a0a /spec/algebra
parent26ed429976ac6486c0473f13b6e0f16e05ede484 (diff)
downloadrails-068b184a59a98b4acdc63a2833c360199d138c1d.tar.gz
rails-068b184a59a98b4acdc63a2833c360199d138c1d.tar.bz2
rails-068b184a59a98b4acdc63a2833c360199d138c1d.zip
PERF: removing many splats
Diffstat (limited to 'spec/algebra')
-rw-r--r--spec/algebra/unit/relations/project_spec.rb6
-rw-r--r--spec/algebra/unit/relations/relation_spec.rb8
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/algebra/unit/relations/project_spec.rb b/spec/algebra/unit/relations/project_spec.rb
index 8886e65a2e..294bffafe9 100644
--- a/spec/algebra/unit/relations/project_spec.rb
+++ b/spec/algebra/unit/relations/project_spec.rb
@@ -9,7 +9,7 @@ module Arel
describe '#attributes' do
before do
- @projection = Project.new(@relation, @attribute)
+ @projection = Project.new(@relation, [@attribute])
end
it "manufactures attributes associated with the projection relation" do
@@ -20,13 +20,13 @@ module Arel
describe '#externalizable?' do
describe 'when the projections are attributes' do
it 'returns false' do
- Project.new(@relation, @attribute).should_not be_externalizable
+ Project.new(@relation, [@attribute]).should_not be_externalizable
end
end
describe 'when the projections include an aggregation' do
it "obtains" do
- Project.new(@relation, @attribute.sum).should be_externalizable
+ Project.new(@relation, [@attribute.sum]).should be_externalizable
end
end
end
diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb
index 2a2fb15d89..f4769526da 100644
--- a/spec/algebra/unit/relations/relation_spec.rb
+++ b/spec/algebra/unit/relations/relation_spec.rb
@@ -97,11 +97,11 @@ module Arel
end
it "manufactures a where relation" do
- @relation.where(@predicate).should == Where.new(@relation, @predicate)
+ @relation.where(@predicate).should == Where.new(@relation, [@predicate])
end
it "accepts arbitrary strings" do
- @relation.where("arbitrary").should == Where.new(@relation, "arbitrary")
+ @relation.where("arbitrary").should == Where.new(@relation, ["arbitrary"])
end
describe 'when given a blank predicate' do
@@ -113,7 +113,7 @@ module Arel
describe '#order' do
it "manufactures an order relation" do
- @relation.order(@attribute1, @attribute2).should == Order.new(@relation, @attribute1, @attribute2)
+ @relation.order(@attribute1, @attribute2).should == Order.new(@relation, [@attribute1, @attribute2])
end
describe 'when given a blank ordering' do
@@ -149,7 +149,7 @@ module Arel
describe '#group' do
it 'manufactures a group relation' do
- @relation.group(@attribute1, @attribute2).should == Group.new(@relation, @attribute1, @attribute2)
+ @relation.group(@attribute1, @attribute2).should == Group.new(@relation, [@attribute1, @attribute2])
end
describe 'when given blank groupings' do