Sha256: e70a349101ef935e05deb016e21358934e438387fc9f44b3e41fd6e6d5ad7114

Contents?: true

Size: 1.09 KB

Versions: 26

Compression:

Stored size: 1.09 KB

Contents

module RSpec
  module Rails
    # @api public
    # Container module for mailer spec functionality. It is only available if
    # ActionMailer has been loaded before it.
    module MailerExampleGroup
      # This blank module is only necessary for YARD processing. It doesn't
      # handle the conditional `defined?` check below very well.
    end
  end
end

if defined?(ActionMailer)
  module RSpec
    module Rails
      # Container module for mailer spec functionality.
      module MailerExampleGroup
        extend ActiveSupport::Concern
        include RSpec::Rails::RailsExampleGroup
        include ActionMailer::TestCase::Behavior

        included do
          include ::Rails.application.routes.url_helpers
          options = ::Rails.configuration.action_mailer.default_url_options
          options.each { |key, value| default_url_options[key] = value } if options
        end

        # Class-level DSL for mailer specs.
        module ClassMethods
          # Alias for `described_class`.
          def mailer_class
            described_class
          end
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
rspec-rails-3.9.1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.8.3 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.9.0 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-4.0.0.beta2 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.8.2 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.8.1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.8.0 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.7.2 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.7.1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.7.0 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.6.1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.6.0 lib/rspec/rails/example/mailer_example_group.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/rspec-rails-3.5.2/lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.6.0.beta2 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.6.0.beta1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.5.2 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.5.1 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.5.0 lib/rspec/rails/example/mailer_example_group.rb
rspec-rails-3.5.0.beta4 lib/rspec/rails/example/mailer_example_group.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rspec-rails-3.4.2/lib/rspec/rails/example/mailer_example_group.rb