Sha256: f8f465263b1aaa421294714c2af0a1f82b508fa2dda5e5104a21817926e62a74

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

require "spec_helper"

module RSpec::Rails
  describe MailerExampleGroup do
    module ::Rails; end
    before do
      Rails.stub_chain(:application, :routes, :url_helpers).and_return(Rails)
      Rails.stub_chain(:configuration, :action_mailer, :default_url_options).and_return({})
    end

    it { is_expected.to be_included_in_files_in('./spec/mailers/') }
    it { is_expected.to be_included_in_files_in('.\\spec\\mailers\\') }

    it "adds :type => :mailer to the metadata" do
      group = RSpec::Core::ExampleGroup.describe do
        include MailerExampleGroup
      end
      expect(group.metadata[:type]).to eq(:mailer)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-rails-3.0.0.beta2 spec/rspec/rails/example/mailer_example_group_spec.rb
rspec-rails-2.99.0.beta2 spec/rspec/rails/example/mailer_example_group_spec.rb