I think it is a common test case you would meet. For example, you want
to test a user registry scenario. You write:
Scenario: User Registry
When I dosth
Then I dosth
...
And now business has some changes. Register should have to activate his
account by a secret code sent by mobile phone.
hi Parker, maybe it is not an association mock problem. I view your code
and I think you need to correct one place
@account.stub!(:articles).and_return(@article)
#=>
@account.stub!(:article).and_return(@article)
--
Posted via http://www.ruby-forum.com/.
Matt Wynne wrote:
> On 26 Nov 2008, at 03:27, Newman Huang wrote:
>
>> account by a secret code sent by mobile phone. So you need to write
>> And I fill in "activate code" with "code"
>> If you use ant to write build file, or rake task, dependency
now i use webrat for cucumber scenario testing. i have a page with a
form, which will post to a bank payment gateway. that is,
http://www.abank.com/pay/blablabla";>
...
my scenario step script is:
==
And I press "confirm"
==
then I got such an error:
"No route matches "/pay/blablabla"
Newman Huang wrote:
> now i use webrat for cucumber scenario testing. i have a page with a
> form, which will post to a bank payment gateway. that is,
>
> http://www.abank.com/pay/blablabla";>
>...
>
>
>
> my scenario step script is:
>
> ==
>
try:
[EMAIL PROTECTED] = User.find(params[:user_id])
User.stub(:find).with(xx).and_return(@user)
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users