On Jul 17, 2013, at 5:40 AM, Sumit Srivastava <[email protected]> 
wrote:

> 
> 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. 

What exactly is the behavior "gets stuck" ? And what do you mean by "It doesn't 
responds" ?Please include output and error messages.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/7B4AE662-B769-47BB-933E-C607E630B0E9%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to