Could anyone please explain what this test code do:
assert_difference('Post.count') do
post :create, :post => { :title => 'Hi', :body => 'This is my first post.'}
end
and...
assert_difference 'ActionMailer::Base.deliveries.size', +1 do
post :invite_friend, :email => '[email protected]'
end
I cant understand it even though I read the documentation.
Thanks!