aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/nodes/select_statement_spec.rb
blob: a024710c78d8d17de595f8b21f834361d19d4dd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe Arel::Nodes::SelectStatement do
  describe "#clone" 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

      dolly = statement.clone
      dolly.cores.should == %w[a0 b1 c2]
    end
  end
end