Sha256: 43c1464b270d055e44a80bd0d2076991385f9f36b7eec9a50ec424c986d98c1f
Contents?: true
Size: 658 Bytes
Versions: 6
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' describe CopycopterClient::RequestSync do let(:sync) { {} } let(:response) { 'response' } let(:env) { 'env' } let(:app) { stub('app', :call => response) } before { sync.stubs(:flush => nil, :download => nil) } subject { CopycopterClient::RequestSync.new(app, :sync => sync) } it "invokes the upstream app" do result = subject.call(env) app.should have_received(:call).with(env) result.should == response end it "flushes defaults" do subject.call(env) sync.should have_received(:flush) end it "downloads new copy" do subject.call(env) sync.should have_received(:download) end end
Version data entries
6 entries across 6 versions & 1 rubygems