[rspec-users] How do I stub a view in rspec-2

2010-06-09 Thread Trey
Hi, I'm in the process of upgrading an app to Rails 3/Rspec 2. I see that stubbing a view helper method has changed in Rspec 2. It looks like instead of doing template.stub!, we're now supposed to do view.stub!, but I can't seem to get this to work on beta 10. I get an "undefined local variable

[rspec-users] Routing errors with Rails 3.0.1 and Rspec 2.0.1

2010-10-19 Thread Trey
uot;, :action=>"about"} This fails if I run rspec by 'rake routes' or by 'bundle exec autotest'. But, and here's the weird thing, if I cause autotest to run that file again, or if I manually run bundle exec rspec spec/ controllers/site_cont

[rspec-users] How do I stub a view in rspec-2

2010-06-08 Thread Trey Bean
, but I can't figure out what it was replaced with. Something in ActionView::TestCase::Behavior? I'm on rails 3.0.0.beta3. Any idea what I'm missing? Thanks, Trey ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] How do I stub a view in rspec-2

2010-06-08 Thread Trey Bean
, but I can't figure out what it was replaced with. Something in ActionView::TestCase::Behavior? I'm on rails 3.0.0.beta3. Any idea what I'm missing? Thanks, Trey ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How do I stub a view in rspec-2

2010-06-08 Thread Trey Bean
Thanks David! On Tue, Jun 8, 2010 at 10:41 AM, dchelim...@gmail.com wrote: > > > On Jun 8, 12:15 pm, David Chelimsky wrote: > > On Jun 8, 2010, at 10:26 AM, Trey Bean wrote: > > > > > > > > > > > > > Hi, > > > > > I

Re: [rspec-users] How do I stub a view in rspec-2

2010-06-09 Thread Trey Bean
I've been using edge since your commit (and rails 3 beta 4) and it's working great. Thanks! On Wed, Jun 9, 2010 at 6:56 AM, David Chelimsky wrote: > On Sat, Jun 5, 2010 at 8:24 PM, Trey wrote: > > Hi, > > > > I'm in the process of upgrading an app to Rails 3

Re: [rspec-users] assigns in RSpec 2 - deprecation warning on rendered?

2010-06-09 Thread Trey Bean
Hi Kristian, The new rspec 2 way of doing assigns is assign(variable_name, whats_being_assigned). So your example becomes: assign(:message, stub("Message")) That should get rid of your deprecation message. Cheers, Trey On Wed, Jun 9, 2010 at 10:56 AM, Kristian Mandrup wrote: >

Re: [rspec-users] assigns in RSpec 2 - deprecation warning on rendered?

2010-06-09 Thread Trey Bean
#x27;message', :text => 'hello world'). As to the deprecation message, if you're still using response, you should be using rendered. The message is correct. Hope the helps ya, Trey On Wed, Jun 9, 2010 at 3:28 PM, Kristian Mandrup wrote: > > assign(:message, stu

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Trey Bean
It looks like you need to put those lines in an it block. it 'should...' do token... end Trey On Jun 14, 2010, at 1:05 PM, Marcelo de Moraes Serpa wrote: > Hello list, > > I have this very simple model spec: > > require 'spec_helper' > > describ