[rspec-users] Agh, this is annoying. Why is this happening?

2007-07-12 Thread Fischer, Daniel
My problem: Mock 'Task_1005' received unexpected message :user_id= with (1) No matter what I do to try to stub that out it will still fail out and give me that message. Here is my spec describe TasksController, "handling POST /tasks" do before(:each) do @task = mock_model(Task, :to_param

Re: [rspec-users] Agh, this is annoying. Why is this happening?

2007-07-12 Thread Ashley Moran
On 12 Jul 2007, at 09:21, Fischer, Daniel wrote: > My problem: > > Mock 'Task_1005' received unexpected message :user_id= with (1) > > No matter what I do to try to stub that out it will still fail out > and give me that message. > > Here is my spec > > > describe TasksController, "handling POS

Re: [rspec-users] Agh, this is annoying. Why is this happening?

2007-07-12 Thread aslak hellesoy
This doesn't make sense: Task.should_receive(:user_id).with(@user.id).and_return(true) It means that you expect this: foo = Task.user_id(@user_id) # foo will be true I suspect you rather want this to happen: @task.user_id = @user_id In which case your mock setup should be: @task.shou

Re: [rspec-users] Agh, this is annoying. Why is this happening?

2007-07-12 Thread David Chelimsky
On 7/12/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > This doesn't make sense: > > Task.should_receive(:user_id).with(@user.id).and_return(true) > > It means that you expect this: > > foo = Task.user_id(@user_id) # foo will be true > > I suspect you rather want this to happen: > > @task.use

[rspec-users] Promoting options to heckle?

2007-07-12 Thread Robert Feldt
Hi, I'm trying out RSpec with the heckle option (for mutation testing). Problem is that heckle goes into an infinite loop when running it on an example. I want to send a "--verbose" to heckle but can't find a way to do that through the spec binary. Since this is not an uncommon situation when us

Re: [rspec-users] Promoting options to heckle?

2007-07-12 Thread David Chelimsky
On 7/12/07, Robert Feldt <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying out RSpec with the heckle option (for mutation testing). > > > Problem is that heckle goes into an infinite loop when running it on an > example. I want to send a "--verbose" to heckle but can't find a way to do > that through

Re: [rspec-users] "they" synonym for "it"?

2007-07-12 Thread Anthony Carlos
If you guys don't mind, I'm going to create a sample web page with this concept on it, stealing from Ashley and David's writings. If people like it, perhaps we can get it included in the documentation. On Jul 11, 2007, at 12:35 PM, Ashley Moran wrote: > > On 11 Jul 2007, at 17:12, Anthony Car

Re: [rspec-users] "they" synonym for "it"?

2007-07-12 Thread aslak hellesoy
On 7/12/07, Anthony Carlos <[EMAIL PROTECTED]> wrote: > If you guys don't mind, I'm going to create a sample web page with > this concept on it, stealing from Ashley and David's writings. If > people like it, perhaps we can get it included in the documentation. > Go ahead, that would be great! As

Re: [rspec-users] Promoting options to heckle?

2007-07-12 Thread Robert Feldt
On 7/12/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/12/07, Robert Feldt <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying out RSpec with the heckle option (for mutation testing). > > > Problem is that heckle goes into an infinite loop when running it on an > example. I want to send a "--ve

Re: [rspec-users] Promoting options to heckle?

2007-07-12 Thread Robert Feldt
On 7/12/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/12/07, Robert Feldt <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying out RSpec with the heckle option (for mutation testing). > > > Problem is that heckle goes into an infinite loop when running it on an > example. I want to send a "--ve