From 4e1dd7eeabde2bd785d47db895e45c11f1693c05 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 30 Aug 2010 18:35:13 -0400 Subject: deep copies of statements aren't necessary. shallow copy the top-level arrays. --- spec/arel/nodes/select_statement_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'spec/arel/nodes/select_statement_spec.rb') diff --git a/spec/arel/nodes/select_statement_spec.rb b/spec/arel/nodes/select_statement_spec.rb index a024710c78..75463f1d95 100644 --- a/spec/arel/nodes/select_statement_spec.rb +++ b/spec/arel/nodes/select_statement_spec.rb @@ -5,12 +5,10 @@ describe Arel::Nodes::SelectStatement do it "clones cores" do statement = Arel::Nodes::SelectStatement.new %w[a b c] - statement.cores.each_with_index do |o, j| - o.should_receive(:clone).and_return("#{o}#{j}") - end + statement.cores.should_receive(:clone).and_return([:cores]) dolly = statement.clone - dolly.cores.should == %w[a0 b1 c2] + dolly.cores.should == [:cores] end end end -- cgit v1.2.3