lib/generators/blacklight/test_support_generator.rb in blacklight-4.0.1 vs lib/generators/blacklight/test_support_generator.rb in blacklight-4.1.0

- old
+ new

@@ -29,7 +29,22 @@ end end") end + + def configure_action_mailer + + if Rails::VERSION::MAJOR == 4 + insert_into_file "config/environments/test.rb", :after => "config.action_mailer.delivery_method = :test\n" do <<-EOF + config.action_mailer.default_options = {from: 'no-reply@example.org'} + EOF + end + else + insert_into_file "config/environments/test.rb", :after => "config.action_mailer.delivery_method = :test\n" do <<-EOF + ActionMailer::Base.default(from: 'no-reply@example.org') + EOF + end + end + end end end