diff --git a/spec/controllers/conversations_controller_spec.rb b/spec/controllers/conversations_controller_spec.rb index 6a48dd68a5fbd81abadc8ccd5b9114c27e81b4f9..4057527d4b68e83925abfcde2c3dd62126ed819d 100644 --- a/spec/controllers/conversations_controller_spec.rb +++ b/spec/controllers/conversations_controller_spec.rb @@ -95,7 +95,7 @@ describe ConversationsController do ) p = Postzord::Dispatcher.build(alice, cnv) - Postzord::Dispatcher.stub!(:new).and_return(p) + p.class.stub!(:new).and_return(p) p.should_receive(:post) post :create, @hash end diff --git a/spec/integration/dispatching_spec.rb b/spec/integration/dispatching_spec.rb index a4cd2ee062965282e139c7e4cf31de03abe39260..e5fe283b9e1d2391998b7c05acb11a1b76dc432c 100644 --- a/spec/integration/dispatching_spec.rb +++ b/spec/integration/dispatching_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' describe "Dispatching" do context "a comment retraction on a public post" do it "should trigger a private dispatch" do - pending "Running this causes test failures in the relayable specs. If you can figure out why, you'll be OUR HERO. <3 <3" luke, leia, raph = set_up_friends # Luke has a public post and comments on it diff --git a/spec/shared_behaviors/relayable.rb b/spec/shared_behaviors/relayable.rb index 7bf27b68d9470442fcd0055a3f58ec90e5f7cec2..085e13ef9780355630011dccf166f490339025ee 100644 --- a/spec/shared_behaviors/relayable.rb +++ b/spec/shared_behaviors/relayable.rb @@ -57,7 +57,7 @@ describe Diaspora::Relayable do it 'dispatches when the person receiving is the parent author' do p = Postzord::Dispatcher.build(@local_luke, @object_by_recipient) p.should_receive(:post) - Postzord::Dispatcher.stub!(:new).and_return(p) + p.class.stub!(:new).and_return(p) @object_by_recipient.receive(@local_luke, @local_leia.person) end