diaspora/spec/lib/stream/activity_spec.rb
2014-10-10 03:49:56 +02:00

21 lines
544 B
Ruby

require 'spec_helper'
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Activity do
before do
@stream = Stream::Activity.new(alice)
end
describe 'shared behaviors' do
it_should_behave_like 'it is a stream'
end
describe "#posts" do
it "calls EvilQuery::Participation with correct parameters" do
expect(::EvilQuery::Participation).to receive(:new)
.with(alice)
.and_return(double.tap { |m| allow(m).to receive(:posts)})
@stream.posts
end
end
end