From 068b184a59a98b4acdc63a2833c360199d138c1d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 Jul 2010 12:01:08 -0700 Subject: PERF: removing many splats --- spec/algebra/unit/relations/project_spec.rb | 6 +++--- spec/algebra/unit/relations/relation_spec.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'spec/algebra') 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 -- cgit v1.2.3