>> Address.should_receive(:new).with(no_args).and_return @address
That doesn't seem to work either. I had also tried with :any and that
failed as well.
It does seem to work when removing the .with() call though.
--
Posted via http://www.ruby-forum.com/.
___
Is it just me or does anyone else miss being able to create something
quickly. Once you start writing all the tests your time is now
increased by a factor of 10. I agree with the logic in testing, but am
I doing something wrong?
Take the simple example of a controller test for an index action th
Thanks for the info Pat. To be honest that is what I wanted to hear.
There seems to be such an importance set on the lines of code to lines
of testing ratio that it seems a person is violating some rule if the
ratio isn't high enough to the right.
The thing that bugged me when writing out the
Zach Dennis wrote:
> When I write software for myself I tend to flip flop. Sometimes I am
> writing things to learn or play and I don't test.
I did that on a recent small project and I was amazed at how fast I was
able to get things done.
> Here's another perspective to look at it from. When you
Zach Dennis wrote:
> Can someone change this implementation and still have your tests pass,
> but have the implementation be broken? If they can then yes it is
> worth the 40 lines.
It is partly this paranoia of someone changing the code that makes me
question testing of this magnitude. Other t