Skip to content

Instantly share code, notes, and snippets.

@juno
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juno/536846c981ebff4b36e7 to your computer and use it in GitHub Desktop.
Save juno/536846c981ebff4b36e7 to your computer and use it in GitHub Desktop.
Using rspec-mocks spy. http://journal.sooey.com/254
it 'Qnyp::Episodes::CalculateEpisodeRatingSummary.process を呼び出す' do
user = FactoryGirl.create(:user)
expect(Qnyp::Episodes::CalculateEpisodeRatingSummary)
.to receive(:process)
.with(user)
get :show
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment