On Thu, Aug 2, 2012 at 6:29 PM, Patrick J. Collins
wrote:
>> let! adds a before hook and before hooks get run in the order they're
>> declared, so just declare them in the other order:
>>
>> let!(:yo_momma) { create_yo_momma }
>> config.before(:each) do
>> ActionMailer::base.deliveries.clear
>>
> let! adds a before hook and before hooks get run in the order they're
> declared, so just declare them in the other order:
>
> let!(:yo_momma) { create_yo_momma }
> config.before(:each) do
> ActionMailer::base.deliveries.clear
> end
Hmm.. The way that I usually work is that my "lets" are spec
On Thu, Aug 2, 2012 at 4:24 PM, Patrick J. Collins
wrote:
> I have a model with an observer that emails out upon creation, and I
> want to do some testing of emails that get generated via various
> actions... So I was hoping I could do:
>
> # spec_helper.rb
>
> config.before(:each) do
> ActionM
I have a model with an observer that emails out upon creation, and I
want to do some testing of emails that get generated via various
actions... So I was hoping I could do:
# spec_helper.rb
config.before(:each) do
ActionMailer::base.deliveries.clear
end
# my_phat_observer_spec.rb
let!(:yo_mo
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
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 wrote:
> i implement all this question but i dont have knowledge perfectly
> ...ok
>
> explain with e
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 spe