1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/spec/support/unit/helpers/mailer_builder.rb
Elliot Winkler f922613386 Reorganize unit tests, part II
* Change 'spec' Rake task to 'spec:unit'
* Require unit_spec_helper.rb in unit tests, not spec_helper.rb
* Re-namespace files in spec/support/unit under UnitTests
* Files in spec/support/unit/helpers no longer automatically add
  themselves to RSpec - this happens in unit_spec_helper.rb
* Extract RecordWithDifferentErrorAttributeBuilder and
  RecordValidatingConfirmationBuilder to separate files
2014-11-05 09:53:20 -07:00

12 lines
303 B
Ruby

module UnitTests
module MailerBuilder
def self.configure_example_group(example_group)
example_group.include(self)
end
def define_mailer(name, paths, &block)
class_name = name.to_s.pluralize.classify
define_class(class_name, ActionMailer::Base, &block)
end
end
end