spec/spec_helper.rb in zemanta_client-0.0.2 vs spec/spec_helper.rb in zemanta_client-0.0.3
- old
+ new
@@ -1,7 +1,8 @@
require 'zemanta'
require 'webmock/rspec'
+require 'json'
Zemanta.configure do |c|
c.api_key = 'fake_key'
end
# This file was generated by the `rspec --init` command. Conventionally, all
@@ -38,6 +39,11 @@
end
def stub_zemanta_exception!
stub_request(:post, /api.zemanta.com/).
to_return(:status => 200, :body => '<h1>403 Developer Inactive</h1>')
+end
+
+def stub_zemanta_enhancer!
+ stub_request(:post, /api.zemanta.com/).
+ to_return(:status => 200, :body => fixture("enhancer").to_json)
end