1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Move define_mailer into its own module.

This commit is contained in:
Gabe Berke-Williams 2012-06-29 15:33:39 -05:00
parent 5ff9cd1f51
commit 35b65c2bc3
2 changed files with 10 additions and 5 deletions

View file

@ -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 file

@ -56,11 +56,6 @@ module ModelBuilder
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