Sha256: f77ee4ebbde456aa3de2a657c856e647fd0bf448cba17aee07defad56202b29f
Contents?: true
Size: 1.15 KB
Versions: 13
Compression:
Stored size: 1.15 KB
Contents
require 'spec_helper' describe Manticore::Facade do context "when extended into an arbitrary class" do let(:extended_class) { Class.new do include Manticore::Facade include_http_client end } let(:extended_shared_class) { Class.new do include Manticore::Facade include_http_client shared_pool: true end } it "should get a response" do result = JSON.parse extended_class.get(local_server).body result["method"].should == "GET" end it "should not use the shared client by default" do extended_class.instance_variable_get("@manticore_facade").object_id.should_not == Manticore.instance_variable_get("@manticore_facade").object_id end it "should be able to use the shared client" do extended_shared_class.instance_variable_get("@manticore_facade").object_id.should == Manticore.instance_variable_get("@manticore_facade").object_id end end context "from the default Manticore module" do it "should get a response" do result = JSON.parse Manticore.get(local_server).body result["method"].should == "GET" end end end
Version data entries
13 entries across 13 versions & 1 rubygems