Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
David, On Sep 21, 2007, at 11:19 PM, David Chelimsky wrote: > On 9/21/07, Yurii Rashkovskii <[EMAIL PROTECTED]> wrote: >> Then I will have tens of methods that in fact has nothing really >> different from reused examples > > But, as methods, they are more clear

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
What you are defining is such a narrow use case I > think it would be abused > Sent via BlackBerry from T-Mobile > > -Original Message- > From: "David Chelimsky" <[EMAIL PROTECTED]> > > Date: Fri, 21 Sep 2007 22:03:30 > To:rspec-users > Subjec

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
Then I will have tens of methods that in fact has nothing really different from reused examples On Sep 21, 2007, at 11:14 PM, [EMAIL PROTECTED] wrote: > If you want to reuse stuff in your tests put those test methods in > a separate module and include them into you specs > Sent via BlackBerry

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
>> Sure! But they are not the same stuff. What I was looking for is >> >> it "should do #1" do >> ... >> end >> it "should do X after #1" do >> given_it "should do #1" >> should do_x >> end >> it "should do Y after #1" do >> given_it "should do #1" >> should do_y >> end >> it "should do

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
quot;should do Z after #1 Y" do given_it "should do Y after #1" should do_z end Or am I missing somethiing? On Sep 21, 2007, at 10:49 PM, David Chelimsky wrote: > Have you seen shared behaviours? > > On 9/21/07, Yurii Rashkovskii <[EMAIL PROTECTED]> wrote: >

[rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we reuse story scenarios with GivenScenario). I was not sure if this possibility already exists in rspec (and, honestly, was lazy to c

Re: [rspec-users] response.should_not redirect_to

2007-07-26 Thread Yurii Rashkovskii
David, Depending on action, it is either successful response or response that redirects somewhere (but not to login, since user is "proven" to be authenticated). In this example, I really don't want to care, whether it was successful response or redirection to somewhere,

Re: [rspec-users] response.should_not redirect_to

2007-07-26 Thread Yurii Rashkovskii
David, >> >> Here is an extract from my source code >> >> it "should allow authenticated user to access '#{action}'" do >>@user = mock_user_authentication(:id => 1, :identity_url => >> "http://openid.server/yrashk";, :queues => []) >>get action, params >>assigns[:curre

Re: [rspec-users] response.should_not redirect_to

2007-07-26 Thread Yurii Rashkovskii
On Jul 27, 2007, at 3:26 AM, David Chelimsky wrote: > On 7/26/07, Yurii Rashkovskii <[EMAIL PROTECTED]> wrote: >> Hey, >> >> May be it is just too deep night over here and I'm missing something >> though I got this failure on {{{response.should_not redirect

[rspec-users] response.should_not redirect_to

2007-07-26 Thread Yurii Rashkovskii
Hey, May be it is just too deep night over here and I'm missing something though I got this failure on {{{response.should_not redirect_to}}}: 'QueuesController should allow authenticated user to access 'show'' FAILED Matcher does not support should_not. See Spec::Matchers for more information