spec/lib/onebox/engine/json_spec.rb in onebox-1.1.0 vs spec/lib/onebox/engine/json_spec.rb in onebox-1.2.0

- old
+ new

@@ -1,16 +1,14 @@ require "spec_helper" describe Onebox::Engine::JSON do before(:all) do - @link = "http://gist.github.com" - fake(@link, response("githubgist")) + @link = "http://stackoverflow.com" + fake(@link, response("stackexchange")) end - before(:each) { Onebox.defaults.cache.clear } + before(:each) { Onebox.options.cache.clear } - let(:link) { @link } - describe "#raw" do class OneboxEngineJSON include Onebox::Engine include Onebox::Engine::JSON @@ -18,10 +16,10 @@ @url = link end end it "returns a hash" do - object = OneboxEngineJSON.new("http://gist.github.com").send(:raw) + object = OneboxEngineJSON.new(@link).send(:raw) expect(object).to be_a(Hash) end end end