blob: 860d1c448aa49cd017191e1c668e3924317fd18a (
plain) (
tree)
|
|
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
|