Sha256: faba55b1b83e7f2600eb5d057a4021af21515771c5a3dda41e24e2d0d995deff
Contents?: true
Size: 894 Bytes
Versions: 2
Compression:
Stored size: 894 Bytes
Contents
require 'spec_helper' describe :response do after(:all) { ShopifyAPI::Mock.reset } describe "#new" do before { @fixture = ShopifyAPI::Mock::Fixture.find :orders } it "should cache the new response" do count = ShopifyAPI::Mock::Response.all.count ShopifyAPI::Mock::Response.new(:get, "/orders.json", @fixture) ShopifyAPI::Mock::Response.all.count.should eq count + 1 end end describe "class methods" do describe "#all" do subject { ShopifyAPI::Mock::Response.all } it { should be_kind_of Array } end describe "#clear" do it "should clear the responses" do ShopifyAPI::Mock::Response.new(:get, "/orders.json", @fixture) ShopifyAPI::Mock::Response.all.count.should > 0 ShopifyAPI::Mock::Response.clear ShopifyAPI::Mock::Response.all.count.should eq 0 end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
shopify-mock-new-0.1 | spec/response_spec.rb |
shopify-mock-0.1.2 | spec/response_spec.rb |