Sha256: 07fb340212daf928f083e50e72bc007dc6ff97fb2fbaf5f6453de187c4af6868

Contents?: true

Size: 1.17 KB

Versions: 12

Compression:

Stored size: 1.17 KB

Contents

Feature: URL helpers in mailer examples

  Scenario: using URL helpers with default options
    Given a file named "config/initializers/mailer_defaults.rb" with:
      """ruby
      Rails.configuration.action_mailer.default_url_options = { :host => 'example.com' }
      """
    And a file named "spec/mailers/notifications_spec.rb" with:
      """ruby
      require 'spec_helper'

      describe Notifications do
        it 'should have access to URL helpers' do
          expect { gadgets_url }.not_to raise_error
        end
      end
      """
    When I run `rspec spec`
    Then the examples should all pass

  Scenario: using URL helpers without default options
    Given a file named "config/initializers/mailer_defaults.rb" with:
      """ruby
      # no default options
      """
    And a file named "spec/mailers/notifications_spec.rb" with:
      """ruby
      require 'spec_helper'

      describe Notifications do
        it 'should have access to URL helpers' do
          expect { gadgets_url :host => 'example.com' }.not_to raise_error
          expect { gadgets_url }.to raise_error
        end
      end
      """
    When I run `rspec spec`
    Then the examples should all pass

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/features/mailer_specs/url_helpers.feature
rspec-rails-3.0.0.beta2 features/mailer_specs/url_helpers.feature
rspec-rails-2.99.0.beta2 features/mailer_specs/url_helpers.feature
rspec-rails-2.14.1 features/mailer_specs/url_helpers.feature
rspec-rails-3.0.0.beta1 features/mailer_specs/url_helpers.feature
rspec-rails-2.99.0.beta1 features/mailer_specs/url_helpers.feature
rspec-rails-2.14.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.13.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.13.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.12.2 features/mailer_specs/url_helpers.feature
rspec-rails-2.12.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.12.0 features/mailer_specs/url_helpers.feature