[rspec-users] Specting controller post

J. B. Rainsberger jbrainsberger at gmail.com
Tue Feb 2 09:18:51 EST 2010

On Tue, Feb 2, 2010 at 07:26, Stephen Smithstone
<stephen.smithstone at gmail.com> wrote:

> cheers for the response , seem that attributes is missing from hash on my
> system

You'll find #attributes on ActiveRecord::Base, and not Hash.

Try this:

it "should create new client" do
    // creates me a hash of generated values using Foregey
    client = Client.plan
    // specify that I should be creating a new client with the hash
values from client
    //post to the server
    post 'create' , :client => client
J. B. (Joe) Rainsberger :: http://www.jbrains.ca ::
Diaspar Software Services :: http://www.diasparsoftware.com
Author, JUnit Recipes
2005 Gordon Pask Award for contribution to Agile practice :: Agile
2010: Learn. Practice. Explore.

More information about the rspec-users mailing list