mocking out emhttprequest everywhere

This commit is contained in:
maxwell 2010-10-29 15:16:11 -07:00
parent 4e2425cdef
commit 3ce44d040f
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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