Permalink
Browse files

Update create spec

  • Loading branch information...
1 parent fe78b4f commit 903e38dbdafe1bc75d30732b3718f6656d6e85a1 @remiprev remiprev committed Apr 9, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/model_spec.rb
View
@@ -179,9 +179,13 @@ class User
context "creating resources" do
before do # {{{
- @api = Her::API.new
- @api.setup :base_uri => "https://api.example.com"
+ Her::API.setup :base_uri => "https://api.example.com"
FakeWeb.register_uri(:post, "https://api.example.com/users", :body => { :data => { :id => 1, :fullname => "Tobias Fünke" } }.to_json)
+
+ Object.instance_eval { remove_const :User } if Object.const_defined?(:User)
+ class User
+ include Her::Model
+ end
end # }}}
it "handle one-line resource creation" do # {{{

0 comments on commit 903e38d

Please sign in to comment.