spec/spec_helper.rb in safely-0.1.0pre vs spec/spec_helper.rb in safely-0.1.0
- old
+ new
@@ -5,8 +5,18 @@
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+require 'mail'
+Mail.defaults do
+ delivery_method :test
+end
+
+
RSpec.configure do |config|
config.mock_with(:mocha)
+
+ config.before(:each) do
+ Mail::TestMailer.deliveries.clear
+ end
end