diff --git a/spec/helper_methods.rb b/spec/helper_methods.rb index cc868992472a3b22d1ebb1dbd612c9f3345b8814..1c4a1189a276f1aad7bd80739f0942f7c677ebdb 100644 --- a/spec/helper_methods.rb +++ b/spec/helper_methods.rb @@ -27,6 +27,12 @@ module HelperMethods models end + def stub_user_message_handle_methods(user) + user.stub!(:push_to_people) + user.stub!(:push_to_hub) + user.stub!(:push_to_person) + end + def message_queue User::QUEUE end diff --git a/spec/lib/em-webfinger_spec.rb b/spec/lib/em-webfinger_spec.rb index bb6cdfecf3c563a4d54dd2715437bbe5c0b98fc9..a90ae457de8e50ce0808a5d324499286620fdeec 100644 --- a/spec/lib/em-webfinger_spec.rb +++ b/spec/lib/em-webfinger_spec.rb @@ -108,7 +108,6 @@ describe EMWebfinger do context 'webfingering local people' do it 'should return a person from the database if it matches its handle' do person - EventMachine::HttpRequest.should_not_receive(:new) EM.run do finger.on_person { |p| p.should == person diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e4cf866c001d284514b5de63e125245c5b7ff03a..58e544a4cd6ac9d6965f4aea34e2d6593b5ce67f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,6 +29,7 @@ RSpec.configure do |config| config.before(:each) do stub_sockets + EventMachine::HttpRequest.any_instance.stubs(:new).returns(FakeHttpRequest.new(:success)) DatabaseCleaner.clean end end