mock out slow things that our tests dont need for speed
This commit is contained in:
parent
3d569cc4bc
commit
7109cf6c67
3 changed files with 10 additions and 2 deletions
|
|
@ -48,12 +48,15 @@ Cucumber::Rails::World.use_transactional_fixtures = false
|
|||
|
||||
require File.join(File.dirname(__FILE__), "database_cleaner_patches")
|
||||
require File.join(File.dirname(__FILE__), "integration_sessions_controller")
|
||||
require File.join(File.dirname(__FILE__), "poor_mans_webmock")
|
||||
# require File.join(File.dirname(__FILE__), "poor_mans_webmock")
|
||||
|
||||
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")
|
||||
require File.join(File.dirname(__FILE__), "..", "..", "spec", "support","user_methods")
|
||||
include HelperMethods
|
||||
|
||||
require 'webmock/cucumber'
|
||||
WebMock.disable_net_connect!(:allow => /localhost:9887/)
|
||||
|
||||
Before do
|
||||
@no_follow_diaspora_hq_setting = AppConfig[:no_follow_diasporahq]
|
||||
AppConfig[:no_follow_diasporahq] = true
|
||||
|
|
|
|||
|
|
@ -209,9 +209,12 @@ describe Postzord::Dispatcher do
|
|||
Typhoeus::Hydra.stub!(:new).and_return(@hydra)
|
||||
end
|
||||
|
||||
it 'should queue an HttpPost job for each remote person' do
|
||||
it 'should queue an HttpMultiJob for the remote people' do
|
||||
Postzord::Dispatcher::Public.any_instance.unstub(:deliver_to_remote)
|
||||
Resque.should_receive(:enqueue).with(Jobs::HttpMulti, alice.id, anything, @remote_people.map{|p| p.id}, anything).once
|
||||
@mailman.send(:deliver_to_remote, @remote_people)
|
||||
|
||||
Postzord::Dispatcher::Public.stub(:deliver_to_remote)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ RSpec.configure do |config|
|
|||
stub_request(:post, "https://pubsubhubbub.appspot.com/")
|
||||
disable_typhoeus
|
||||
$process_queue = false
|
||||
Postzord::Dispatcher::Public.any_instance.stub(:deliver_to_remote)
|
||||
Postzord::Dispatcher::Private.any_instance.stub(:deliver_to_remote)
|
||||
end
|
||||
|
||||
config.before(:each, :type => :controller) do
|
||||
|
|
|
|||
Loading…
Reference in a new issue