This commit is contained in:
maxwell 2010-10-29 16:21:39 -07:00
parent a272b22208
commit c1c045a4cd
4 changed files with 15 additions and 13 deletions

View file

@ -35,7 +35,7 @@ class EMWebfinger
if profile_url
get_webfinger_profile(profile_url)
else
process_callbacks "webfinger does not seem to be enabled for #{@account}"
process_callbacks "webfinger does not seem to be enabled for #{@account}'s host"
end
}

View file

@ -67,7 +67,7 @@ describe EMWebfinger do
n = EMWebfinger.new("foo@example.com")
n.on_person{|person|
person.should == "webfinger does not seem to be enabled for #{fake_account}"
person.should == "webfinger does not seem to be enabled for #{fake_account}'s host"
}
end
end
@ -107,7 +107,7 @@ describe EMWebfinger do
context 'webfingering local people' do
it 'should return a person from the database if it matches its handle' do
person
person.save
EM.run do
finger.on_person { |p|
p.should == person

View file

@ -25,14 +25,6 @@ describe Diaspora::UserModules::Friending do
Notifier.stub!(:request_accepted).and_return(deliverable)
end
before :all do
User.any_instance.stubs(:push_to_people)
end
after :all do
unstub_mocha_stubs
end
describe '#contact_for' do
it 'returns a contact' do

View file

@ -29,7 +29,9 @@ RSpec.configure do |config|
config.before(:each) do
stub_sockets
EventMachine::HttpRequest.any_instance.stubs(:new).returns(FakeHttpRequest.new(:success))
EventMachine::HttpRequest.stub!(:new).and_return(FakeHttpRequest.new(:success))
EventMachine::HttpRequest.any_instance.stubs(:post)
EventMachine::HttpRequest.any_instance.stubs(:get)
DatabaseCleaner.clean
end
end
@ -51,10 +53,18 @@ class FakeHttpRequest
@callbacks.pop unless @callbacks.nil? || @callbacks.empty?
end
def response_header
self
end
def method_missing(method)
self
end
def post(opts = nil);
self
end
def get(opts = nil)
self
end