Skip to content

Instantly share code, notes, and snippets.

@hasham2
Created January 19, 2010 10:51
Show Gist options
  • Select an option

  • Save hasham2/280846 to your computer and use it in GitHub Desktop.

Select an option

Save hasham2/280846 to your computer and use it in GitHub Desktop.
context "logged in user" do
setup do
@user_resp = load_xml_fixture_file('user')
FakeWeb.register_uri(:get, "http://api.sample.com/users/123.xml", :body => @user_resp, :status => ["200", "OK"])
end
should "be able to retrieve user object with given id" do
user = User.find(123)
assert_equal 123, user.id
assert_equal "test@example.com", user.email
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment