aboutsummaryrefslogblamecommitdiffstats
path: root/spec/nodes/select_statement_spec.rb
blob: 68bde3c4f7ef0a1b34a3892dbd5b42c824d7d068 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                        
                      


                                                            
                                                                         

                             
                                        


       
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.map { |x| x.should_receive(:clone).and_return(:f) }

      dolly = statement.clone
      dolly.cores.should == [:f, :f, :f]
    end
  end
end