Skip to content

Instantly share code, notes, and snippets.

@ryenski
Created June 27, 2017 19:05
Show Gist options
  • Save ryenski/a6336c43afc503034d75fab0d0733092 to your computer and use it in GitHub Desktop.
Save ryenski/a6336c43afc503034d75fab0d0733092 to your computer and use it in GitHub Desktop.
Testing service objects
describe CommentCreator do
it 'should persist record' do
assert_difference 'Comment.count', +1 do
CommentCreator.new(comment_params).call
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment