Skip to content

Instantly share code, notes, and snippets.

@bkerley
Created January 6, 2013 23:29
Show Gist options
  • Save bkerley/4471032 to your computer and use it in GitHub Desktop.
Save bkerley/4471032 to your computer and use it in GitHub Desktop.
Given /^I expect an email$/ do
@mail_expectation = Mail::Message.any_instance.expects(:deliver)
end
Then /^.+ should have a .+ email$/ do
invocation_count = @mail_expectation.instance_variable_get(:@invocation_count)
assert invocation_count > 0, "Expected #{invocation_count} to be greater than zero."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment