Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Ryan  
View profile  
 More options Sep 20 2010, 5:09 pm
From: Dan Ryan <scrip...@gmail.com>
Date: Mon, 20 Sep 2010 14:09:15 -0700 (PDT)
Local: Mon, Sep 20 2010 5:09 pm
Subject: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)
I'm having trouble testing a Rails 3 app with RSpec (2.0.0.beta.22)
and Shoulda (2.11.3) matchers:

http://pastie.org/1170752

The closest thing I could find to this was
http://rspeicher.tumblr.com/post/1111927237/an-rspec2-shoulda-control...,
but as you can see from the above pastie, I have followed the advice.

assigns(:var) works, but the assign_to(:var) matcher does not.  What's
the fix?  What other info do you need from me?

Thanks!
Dan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mhenrixon  
View profile  
 More options Mar 6 2011, 12:19 pm
From: mhenrixon <mik...@zoolutions.se>
Date: Sun, 6 Mar 2011 09:19:59 -0800 (PST)
Local: Sun, Mar 6 2011 12:19 pm
Subject: Re: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)

Also have the same problem I followed the blog post but assign_to doesn't
work. Anything I can do to help?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mhenrixon  
View profile  
 More options Mar 6 2011, 12:27 pm
From: mhenrixon <mik...@zoolutions.se>
Date: Sun, 6 Mar 2011 09:27:03 -0800 (PST)
Local: Sun, Mar 6 2011 12:27 pm
Subject: Re: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)

this works for me :

    it "should assign to orders" do
      assigns[:orders].should == @orders
    end          

Really frustrating! :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikael Henriksson  
View profile  
 More options Mar 6 2011, 1:44 pm
From: Mikael Henriksson <mik...@zoolutions.se>
Date: Sun, 6 Mar 2011 19:44:44 +0100
Local: Sun, Mar 6 2011 1:44 pm
Subject: Re: [shoulda] Re: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)

The blog post that the first post in the thread refers to : http://rspeicher.tumblr.com/post/1111927237/an-rspec2-shoulda-control...

subject { controller }
it { should assign_to :order } #is not working for me

# the following works
it "should assign to orders" do
 assigns[:orders].should == @orders
end

Mikael Henriksson

Tel: +46 (0) 730- 393 200 http://flavors.me/mhenrixon
mik...@zoolutions.se


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fw: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)" by Mikael Henriksson
Mikael Henriksson  
View profile  
 More options Mar 6 2011, 1:58 pm
From: Mikael Henriksson <mik...@zoolutions.se>
Date: Sun, 6 Mar 2011 19:58:51 +0100
Local: Sun, Mar 6 2011 1:58 pm
Subject: Fw: assign_to failing in Rails 3 / RSpec 2 / Shoulda 2.11.3 (Expected action to assign a value for @var)

Forwarded message:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »