Sha256: 5ae9b37e73c083155c23d514481e3fa83de4706e8791f7f3ee25ae565962bb84

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 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:
      """
      Rails.configuration.action_mailer.default_url_options = { :host => 'example.com' }
      """
    And a file named "spec/mailers/notifications_spec.rb" with:
      """
      require 'spec_helper'

      describe Notifications do
        it 'should have access to URL helpers' do
          lambda { gadgets_url }.should_not raise_error
        end
      end
      """
    When I run "rspec spec"
    Then the output should contain "1 example, 0 failures"

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

      describe Notifications do
        it 'should have access to URL helpers' do
          lambda { gadgets_url :host => 'example.com' }.should_not raise_error
          lambda { gadgets_url }.should raise_error
        end
      end
      """
    When I run "rspec spec"
    Then the output should contain "1 example, 0 failures"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rspec-rails-2.4.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.4.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.3.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.3.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.2.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.2.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.1.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.1 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0.rc features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0.beta.22 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0.beta.20 features/mailer_specs/url_helpers.feature