1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/spec/arel/nodes/update_statement_spec.rb

18 lines
521 B
Ruby

require 'spec_helper'
describe Arel::Nodes::UpdateStatement do
describe "#clone" do
it "clones wheres and values" do
statement = Arel::Nodes::UpdateStatement.new
statement.wheres = %w[a b c]
statement.values = %w[x y z]
statement.wheres.should_receive(:clone).and_return([:wheres])
statement.values.should_receive(:clone).and_return([:values])
dolly = statement.clone
check dolly.wheres.should == [:wheres]
check dolly.values.should == [:values]
end
end
end