Duplicating an instance which is a duplicate of another

4 views
Skip to first unread message

Sumit Srivastava

unread,
Jul 17, 2013, 8:40:16 AM7/17/13
to rubyonra...@googlegroups.com

Hi,

Following is the code,

shared_context "of cloning" do
  let(:cloned_record) {donor.dup}
  let(:second_cloned_record) {donor.dup}
  let(:clone_of_cloned) {cloned_record.dup}

  it "returns new record" do
    cloned_record.should be_new_record
  end

  it "saves returned record properly" do
    cloned_record.should be_valid
  end

  it "returns record that could be successfully saved" do
    cloned_record.save.should be_true
  end
end


The line is bold/red is the one which is I have doubt about.
When I try to use clone_of_cloned.name in any other function, it doesn't responds. The code gets stuck there.

Tamara Temple

unread,
Jul 17, 2013, 11:04:52 AM7/17/13
to rubyonra...@googlegroups.com
What exactly is the behavior "gets stuck" ? And what do you mean by "It doesn't responds" ?Please include output and error messages.

Reply all
Reply to author
Forward
0 new messages