Re: [rspec-users] Telling rspec that a method might be called with a OR b ... ?

2009-07-28 Thread Rick DeNatale
On Tue, Jul 28, 2009 at 4:57 PM, David Chelimsky wrote: >> for arguments. Any way to tell rspec that a method might be called >> with argument A or B (or C) ? :) > > There is no way to specify A or B, but you can stub both and set > expectations about the resulting behavior that tie back to the stu

Re: [rspec-users] [cucumber] table.hashes

2009-07-28 Thread David Chelimsky
On Jul 28, 2009, at 4:59 PM, Yi Wen wrote: Hi, I had a couple features failed with cucumber 0.3.90 because table.hashes is frozen so I cannot change the hashes anymore. Just wonder what's the reason behind the change? Thanks Yi Please address cucumber questions to the cukes google grou

Re: [rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]

2009-07-28 Thread Andy Pearson
Hey David, > Looks like two versions of rspec are getting loaded: > > /Library/Ruby/Gems/1.8/gems/rspec-1.2.8 > /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12 > > Do you need rspec-1.1.12 for some reason? I'm not sure why it's > getting loaded, but I'm quite confident it won't get loaded if it

Re: [rspec-users] [cucumber] table.hashes

2009-07-28 Thread Ben Mabey
Yi Wen wrote: Hi, I had a couple features failed with cucumber 0.3.90 because table.hashes is frozen so I cannot change the hashes anymore. Just wonder what's the reason behind the change? Thanks Yi ___ rspec-users mailing list rspec-users@ruby

[rspec-users] [cucumber] table.hashes

2009-07-28 Thread Yi Wen
Hi, I had a couple features failed with cucumber 0.3.90 because table.hashes is frozen so I cannot change the hashes anymore. Just wonder what's the reason behind the change? Thanks Yi ___ rspec-users mailing list rspec-users@rubyforge.org htt

Re: [rspec-users] Telling rspec that a method might be called with a OR b ... ?

2009-07-28 Thread David Chelimsky
On Tue, Jul 28, 2009 at 2:28 PM, Marcelo de Moraes Serpa wrote: > Hey list, > > Let's say I have a model, and I want to setup a partial mock in it, to > set the expectation that it should receive a message with specific > arguments. I know that this is not a good design for a spec, and that > I wou

Re: [rspec-users] How should you make sure the user is not authenticated

2009-07-28 Thread r_j_h_box-sf
- Original Message > From: Matt Wynne > Don't forget the session is thrown away for each scenario, so if you're > starting > a new scenario you wont' be logged in, by default. I wonder if that is true also when Webrat/Selenium or Celerity is involved? Randy _

[rspec-users] Telling rspec that a method might be called with a OR b ... ?

2009-07-28 Thread Marcelo de Moraes Serpa
Hey list, Let's say I have a model, and I want to setup a partial mock in it, to set the expectation that it should receive a message with specific arguments. I know that this is not a good design for a spec, and that I would probably need to separate this in another example -- but let's say that

[rspec-users] passing parameters when testing controller actions

2009-07-28 Thread norm
My grad_surveys_controller has a student_edit method. An id parameter is passed in the url and a token is passed in a query string. For example: http://www.example.com/students/34/grad_surveys/21/student_edit?token=ab56e1b47 so the params hash should contain {"controller"=>"grad_surveys"

Re: [rspec-users] How should you make sure the user is not authenticated

2009-07-28 Thread Marcelo de Moraes Serpa
>My equivalent step is implemented like this: > >Given /I am not logged in/ do > # of course you're not logged in! >end > > >Don't forget the session is thrown away for each scenario, so if you're >starting a new scenario you wont' be logged in, by default. > >cheers, >Matt Thank you all for the

Re: [rspec-users] How should you make sure the user is not authenticated

2009-07-28 Thread Matt Wynne
On 27 Jul 2009, at 17:39, Marcelo de Moraes Serpa wrote: Hey list! Let's say I have a user story for authentication/login. I have seen many cucumber scenarios like this: Scenario: User logs in succesfully Given I am not authenticated When I go to the login page ... From what I have seen, t