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

describe Arel::Nodes::DeleteStatement do
  describe "#clone" do
    it "clones wheres" do
      statement = Arel::Nodes::DeleteStatement.new
      statement.wheres = %w[a b c]

      statement.wheres.should_receive(:clone).and_return([:wheres])

      dolly = statement.clone
      dolly.wheres.should == [:wheres]
    end
  end
end