Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread aslak hellesoy
On 8/19/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/19/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > > On 8/16/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > On 8/16/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > > > > On 8/16/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > > > On

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Michael Klishin
+1 for those On 19/08/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > I'm thinking about other ways to be explicit about this (besides the > verbose ":behaviour_type => :view". What if we added methods like: > > describe_model > describe_view > describe_controller > describe_helper -- MK __

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
> I'd like to avoid that because it would be extra noise and it > shouldn't be necessary. The generated specs work absolutely perfectly > for me as/is (I'm on OS X). There have been a couple of bugs related > to regexps and windows paths over time, but they've either been > resolved or await more f

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread aslak hellesoy
On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > > I'd like to avoid that because it would be extra noise and it > > shouldn't be necessary. The generated specs work absolutely perfectly > > for me as/is (I'm on OS X). There have been a couple of bugs related > > to regexps and windows paths ove

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
aslak hellesoy wrote: > On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >>> I'd like to avoid that because it would be extra noise and it >>> shouldn't be necessary. The generated specs work absolutely perfectly >>> for me as/is (I'm on OS X). There have been a couple of bugs related >>> to regex

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread David Chelimsky
On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > aslak hellesoy wrote: > > On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > >>> I'd like to avoid that because it would be extra noise and it > >>> shouldn't be necessary. The generated specs work absolutely perfectly > >>> for me as/is (I'm on

Re: [rspec-users] RSpec --format --html:/path/to/file.html

2007-08-20 Thread Cody P. Skidmore
Scott Taylor wrote: > Actually you can combine then in any way you choose. This would work > as well: > > --format html:/foo/bar > >> --format >> html:/path/to/my.html >> >> Then on the command line: >> >> spec spec -O path/to/spec.opts I was hesitant to bring this up again, but I couldn't run i

Re: [rspec-users] RSpec --format --html:/path/to/file.html

2007-08-20 Thread aslak hellesoy
On 8/20/07, Cody P. Skidmore <[EMAIL PROTECTED]> wrote: > Scott Taylor wrote: > > Actually you can combine then in any way you choose. This would work > > as well: > > > > --format html:/foo/bar > > > >> --format > >> html:/path/to/my.html > >> > >> Then on the command line: > >> > >> spec spec -O

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-20 Thread Andrew WC Brown
Still having trouble ='( def create @user = User.find(params[:user_id]) @ticket = @user.tickets.build(params[:ticket]) if @ticket.save redirect_to tickets_path else render new_usr_ticket_path(params[:user_id]) end end describe TicketsController, "handling POST

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-20 Thread Andrew WC Brown
I solved my problem. def create @ticket = Ticket.new(params[:ticket]) @ticket.user = current_user if @ticket.save redirect_to tickets_path else render new_ticket_path(params[:user_id]) end end Like my mom would nag: "If you rspec'd from the start you wouldn't h

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Zach Dennis
Here is a link to the .mov: http://www.continuousthinking.com/movies/RSpec_mockModelError.mov In doing this I realized something. I only get the error when I try to run an individual spec within the spec/views// directory. Thanks for the suggestion Jay, Zach On 8/20/07, David Chelimsky <[EM

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread aslak hellesoy
Several problems here: First, rspec_scaffold must be given a *singularised* name, in your case 'product'. (This is Rails being finicky, not RSpec). Second, after running rspec_scaffold you must run rake db:migrate Third, before you can run specs with ruby or spec, you must create the test databa

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Zach Dennis
On 8/20/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > Several problems here: > > First, rspec_scaffold must be given a *singularised* name, in your > case 'product'. (This is Rails being finicky, not RSpec). ok > Second, after running rspec_scaffold you must run rake db:migrate This I didn't d

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
On 8/20/2007 8:20 AM, aslak hellesoy wrote: > On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >>> I'd like to avoid that because it would be extra noise and it >>> shouldn't be necessary. The generated specs work absolutely perfectly >>> for me as/is (I'm on OS X). There have been a couple of bug

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread David Chelimsky
On 8/20/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > On 8/20/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > > Several problems here: > > > > First, rspec_scaffold must be given a *singularised* name, in your > > case 'product'. (This is Rails being finicky, not RSpec). > > ok > > > Second, after r

[rspec-users] using restful_authentication current_user inside controller specs

2007-08-20 Thread Andrew WC Brown
I'm using restful_authentication in my app and I have the before filters in my application rhtml: before_filter :login_required around_filter :set_timezone around_filter :catch_errors Currently I have them commented out while rspec'in but I'll need to add them in my specs. def create @ti