![]() | How to test chained methods and code inside initializators |
|
17 Oct 2010, 12:35
Del Ben Oscar (9 posts) |
Hi, I’m having a lot of fun testing with RSpec and Cucumber. I can really feel the difference in the quality of the code I produce. I’m having some troubles understanding how to test a couple of things. Usually, if I’m having trouble testing something, it means that my design could probably be improved or changed, but in these cases I think I’m doing the right thing. Here’s the first scenario:
Here I have no idea how to test that the do_something method is called. Another issue I have is with the following code:
Here I’m having trouble understanding how to test that my_method receives another_chained_method and so on. Any help would be very appreciated. Thanks! |
|
19 Oct 2010, 03:49
David Chelimsky (206 posts) |
Please submit your question to the rspec users mailing list: http://rubyforge.org/mailman/listinfo/rspec-users |
| You must be logged in to comment |

