Sha256: 0f505b03cb59ef3250788c932c5382858cb7d1c9755c5068497a68bb7a960be0

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 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 I should see "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 I should see "1 example, 0 failures"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.beta.16 features/mailer_specs/url_helpers.feature