i implement all this question but i dont have knowledge perfectly .......ok........ explain with example code............ tell me what is mock and stub ? stub_model and mock_model ? mock and mock_model? what to use first rspec or cucumber?? which is best rspec or cucumber?? how to write spec in controller,view and model?? i m new born baby and i started crying ........stop my crying .. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120802/5d3e00ec/attachment.html>
Hi Fahim, Have you looked at the documentation here [https://www.relishapp.com/rspec/] ? There are lots of great examples. Regards, Ken On Thu, Aug 2, 2012 at 1:14 AM, Fahim Patel <pafahim at gmail.com> wrote:> i implement all this question but i dont have knowledge perfectly > .......ok........ > > explain with example code............ > tell me what is mock and stub ? > stub_model and mock_model ? > mock and mock_model? > > > what to use first rspec or cucumber?? > which is best rspec or cucumber?? > > > how to write spec in controller,view and model?? > > > i m new born baby and i started crying ........stop my crying .. > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120802/5006707f/attachment.html>
Curtis Schofield
2012-Aug-02 15:02 UTC
[rspec-users] hiiiiiii...........lots of question ..
Hi Fahim These are from wiki Mock http://en.m.wikipedia.org/wiki/Mock_object Stub http://en.m.wikipedia.org/wiki/Test_stub I think of stub as a change to an existing object to isolate specific paths that a method may take. If you are testing a method - it can help to stub out the responses that another method may respond with. A mock is an object that is being used by another object under test that will pretend to be a particular instance with particular responses - a mock object has stubbed methods. I think this is in general - I can get confused about stub and mock . -- Curtis J Schofield BlazingCloud.net "Creativity can solve anything" - George Lois (source: art & copy) On Aug 1, 2012, at 10:14 PM, Fahim Patel <pafahim at gmail.com> wrote:> i implement all this question but i dont have knowledge perfectly .......ok........ > > explain with example code............ > tell me what is mock and stub ? > stub_model and mock_model ? > mock and mock_model? > > > what to use first rspec or cucumber?? > which is best rspec or cucumber?? > > > how to write spec in controller,view and model?? > > > i m new born baby and i started crying ........stop my crying .. > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
On 2 Aug 2012, at 06:14, Fahim Patel wrote:> i implement all this question but i dont have knowledge perfectly .......ok........ > > explain with example code............ > tell me what is mock and stub ? > stub_model and mock_model ? > mock and mock_model? > > > what to use first rspec or cucumber?? > which is best rspec or cucumber?? > > > how to write spec in controller,view and model?? > > > i m new born baby and i started crying ........stop my crying ..I would highly recommend buying a copy of The RSpec Book. It will answer all of these questions any many many more. http://pragprog.com/book/achbd/the-rspec-book cheers, Matt -- Freelance programmer & coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Teacher, http://bddkickstart.com Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne