aboutsummaryrefslogblamecommitdiffstats
path: root/spec/arel/nodes/delete_statement_spec.rb
blob: dd43b70d3508a5fb0b9763b68b2556c7db059cc9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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