Hi,
I was doing some testing to mi controller and a error raise, and it’s
driving me crazy. This are the lines that I wanna test:
@cloning_vector = CloningVector.new(params[:cloning_vector])
@cloning_vector.sequence = Sequence.new(params[:sequence])
What I’m trying to do is following:
@cloning_vector = mock_model(CloningVector)
@sequence = mock_model(Sequence)
CloningVector.should_receive(:new).with("name" => "New
cloning_vector", “cloning_vector_type” =>
1).and_return(@cloning_vector)
@cloning_vector.sequence.should_receive(:new).with(“content” =>
“New Content”).and_return(@sequence)
What am I doing wrong?.. Thanks for your help