aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/nodes/delete_statement_spec.rb
diff options
context:
space:
mode:
authorMike Dalessio <mike@csa.net>2010-08-30 18:35:13 -0400
committerMike Dalessio <mike@csa.net>2010-08-30 18:35:13 -0400
commit4e1dd7eeabde2bd785d47db895e45c11f1693c05 (patch)
tree4fe7931adea5681a15ac5feee3c504cce1ca021a /spec/arel/nodes/delete_statement_spec.rb
parentdc750bef5cf5b577399c84f97b821af26c9554a2 (diff)
downloadrails-4e1dd7eeabde2bd785d47db895e45c11f1693c05.tar.gz
rails-4e1dd7eeabde2bd785d47db895e45c11f1693c05.tar.bz2
rails-4e1dd7eeabde2bd785d47db895e45c11f1693c05.zip
deep copies of statements aren't necessary. shallow copy the top-level arrays.
Diffstat (limited to 'spec/arel/nodes/delete_statement_spec.rb')
-rw-r--r--spec/arel/nodes/delete_statement_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/arel/nodes/delete_statement_spec.rb b/spec/arel/nodes/delete_statement_spec.rb
index 03fa41799a..4d12d184fb 100644
--- a/spec/arel/nodes/delete_statement_spec.rb
+++ b/spec/arel/nodes/delete_statement_spec.rb
@@ -6,12 +6,10 @@ describe Arel::Nodes::DeleteStatement do
statement = Arel::Nodes::DeleteStatement.new
statement.wheres = %w[a b c]
- statement.wheres.each_with_index do |o, j|
- o.should_receive(:clone).and_return("#{o}#{j}")
- end
+ statement.wheres.should_receive(:clone).and_return([:wheres])
dolly = statement.clone
- dolly.wheres.should == %w[a0 b1 c2]
+ dolly.wheres.should == [:wheres]
end
end
end