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:
parent
5ff9cd1f51
commit
35b65c2bc3
2 changed files with 10 additions and 5 deletions
10
spec/support/mailer_builder.rb
Normal file
10
spec/support/mailer_builder.rb
Normal 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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue