aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/nodes/delete_statement_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/arel/nodes/delete_statement_spec.rb b/spec/arel/nodes/delete_statement_spec.rb
new file mode 100644
index 0000000000..dd43b70d35
--- /dev/null
+++ b/spec/arel/nodes/delete_statement_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe Arel::Nodes::SelectStatement do
+ describe "#clone" do
+ it "clones where" 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
+
+ dolly = statement.clone
+ dolly.wheres.should == %w[a0 b1 c2]
+ end
+ end
+end