Sha256: 0c9f28a6466473faf3bc4c1a9888e58b6143f9e6191638a833445b6213be89dc

Contents?: true

Size: 1.21 KB

Versions: 3

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.rb'

      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.rb'

      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

3 entries across 3 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.beta.19 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0.beta.18 features/mailer_specs/url_helpers.feature
rspec-rails-2.0.0.beta.17 features/mailer_specs/url_helpers.feature