Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
user = create_user :first_name => "Steve", :last_name => "Richert"
users = fetch_users
# pick your poison
users.size.should == 1
users.should have(1).item
users.first.should == {
"id" => user.id,
"first_name" => "Steve",
"last_name" => "Richert"
}
# or maybe just this?
users.should == [{
"id" => user.id,
"first_name" => "Steve",
"last_name" => "Richert"
}]
post "/users.json", "first_name" => "Steve", "last_name" => "Richert"
user_id = json['id']
get "/users.json"
json.size.should == 1
json.first.should == {
"id" => user_id,
"first_name" => "Steve",
"last_name" => "Richert"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment