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
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
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
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/Rspec 2. I see that
> > stubbing a
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:
> I have come to
If you want to use your assigned message within your spec, you can assign it
to a variable in the assign call, e.g.
assign(:message, @message = stub('message').
Since you're calling text on the message in your view, you should stub that
method:
assign(:message, @message = stub('message', :text =
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'
>
> describe Token do
> describe "Associations" do
>