aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes/test_select_core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/nodes/test_select_core.rb')
-rw-r--r--test/nodes/test_select_core.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/nodes/test_select_core.rb b/test/nodes/test_select_core.rb
new file mode 100644
index 0000000000..0aacf41720
--- /dev/null
+++ b/test/nodes/test_select_core.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe Arel::Nodes::SelectCore do
+ describe "#clone" do
+ it "clones froms, projections and wheres" do
+ core = Arel::Nodes::SelectCore.new
+ core.froms = %w[a b c]
+ core.projections = %w[d e f]
+ core.wheres = %w[g h i]
+
+ dolly = core.clone
+
+ dolly.froms.must_equal core.froms
+ dolly.projections.must_equal core.projections
+ dolly.wheres.must_equal core.wheres
+
+ dolly.froms.wont_be_same_as core.froms
+ dolly.projections.wont_be_same_as core.projections
+ dolly.wheres.wont_be_same_as core.wheres
+ end
+ end
+end