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 <pafa...@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@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to