Skip to content
Browse files

Move define_mailer into its own module.

  • Loading branch information...
1 parent 5ff9cd1 commit 35b65c2bc351615deb8b51bf9ec8ae6e10dd1474 @gabebw gabebw committed Jun 29, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −0 spec/support/mailer_builder.rb
  2. +0 −5 spec/support/model_builder.rb
View
10 spec/support/mailer_builder.rb
@@ -0,0 +1,10 @@
+module MailerBuilder
+ def define_mailer(name, paths, &block)
+ class_name = name.to_s.pluralize.classify
+ define_class(class_name, ActionMailer::Base, &block)
+ end
+end
+
+RSpec.configure do |config|
+ config.include MailerBuilder
+end
View
5 spec/support/model_builder.rb
@@ -56,11 +56,6 @@ def define_model(name, columns = {}, &block)
define_model_class(class_name, &block)
end
- def define_mailer(name, paths, &block)
- class_name = name.to_s.pluralize.classify
- define_class(class_name, ActionMailer::Base, &block)
- end
-
def drop_created_tables
connection = ActiveRecord::Base.connection

0 comments on commit 35b65c2

Please sign in to comment.
Something went wrong with that request. Please try again.