Re: [rspec-users] rspec groups?

2008-03-08 Thread David Chelimsky
On Fri, Mar 7, 2008 at 9:40 PM, Will Sargent <[EMAIL PROTECTED]> wrote: > One of the things I really liked about TestNG was the grouping > feature. Are there any plans for rSpec to incorporate that? Is there > any way to emulate that functionality in rspec? I'm not familiar with the feature yo

[rspec-users] Session empty after request

2008-03-08 Thread Steve
Can anyone tell me what I'm doing wrong here? it 'should try to set the current user from the session' do controller.session[SessionKeys::USER_ID] = 1 user = mock_model(User) User.stub!(:find).and_return(user) User.should_receive(:find).with(1).and_return(user) controller.should_receive(

[rspec-users] BDD Google Mailing list.

2008-03-08 Thread Joe Ocampo
Hi everyone, We went ahead a created a BDD mailing list in Google to talk towards BDD and how it can be applied to just software development in general (language agnostic). We try to mediate the usage of language syntax but occasionally it creeps up in there. We would love to have Ruby BDD'rs (i

[rspec-users] ridding away with do_request

2008-03-08 Thread Zach Dennis
I'm heading out of town, but had a quick thought I wanted to share. Rather then using ambiguous named request helpers in controller specs like "do_request", I've been using more readable helpers like "post_create". For example... describe ProjectController do def post_create post :create,

[rspec-users] should_receive(:foo).with(any_object)

2008-03-08 Thread Thorben Schröder
Hey, I just ran into a situation where I would like to expect a method call with an argument I know and another one, which is a random number. I think mocking up the rand method is somehow ugly so I thought maybe this is the first time where I can take something from Java to Ruby ;) Java's EasyMoc

Re: [rspec-users] ridding away with do_request

2008-03-08 Thread Pat Maddox
I've always used do_post/do_put etc. But your way is perfectly acceptable :) Pat On 3/8/08, Zach Dennis <[EMAIL PROTECTED]> wrote: > I'm heading out of town, but had a quick thought I wanted to share. > Rather then using ambiguous named request helpers in controller specs > like "do_request", I'v

Re: [rspec-users] should_receive(:foo).with(any_object)

2008-03-08 Thread Rick DeNatale
On 3/8/08, Thorben Schröder <[EMAIL PROTECTED]> wrote: > Hey, > > I just ran into a situation where I would like to expect a method call > with an argument I know and another one, which is a random number. ... > Which gives me the ability to do the should_receive call like this: > > Item.shou

Re: [rspec-users] should_receive(:foo).with(any_object)

2008-03-08 Thread Thorben Schröder
Thanks a lot! Thorben On Sun, Mar 9, 2008 at 1:22 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > On 3/8/08, Thorben Schröder <[EMAIL PROTECTED]> wrote: > > Hey, > > > > I just ran into a situation where I would like to expect a method call > > with an argument I know and another one, which

Re: [rspec-users] should_receive(:foo).with(any_object)

2008-03-08 Thread Thorben Schröder
Just to stay correct: This Item.should_receive(:random_item).with(:anything, :numeric) is marked deprecated. It looks like it should be Item.should_receive(:random_item).with(anything, an_instance_of(Numeric)) Thorben On Sun, Mar 9, 2008 at 1:33 AM, Thorben Schröder <[EMAIL PROTECTED]> wrote:

Re: [rspec-users] ridding away with do_request

2008-03-08 Thread Steve
On Sat, 08 Mar 2008 15:51:01 -0500, Zach Dennis wrote: > I'm heading out of town, but had a quick thought I wanted to share. > Rather then using ambiguous named request helpers in controller specs > like "do_request", I've been using more readable helpers like > "post_create". snip > IMO is add