Sha256: 04562e8a04e4898f3f0ee5ecddd6885c8ceb5f1118e28836d1eaf11fd6bf0901

Contents?: true

Size: 1.44 KB

Versions: 158

Compression:

Stored size: 1.44 KB

Contents

Feature: alias_example_to

  Use `config.alias_example_to` to create new example group methods
  that define examples with the configured metadata.

  If you set the `treat_symbols_as_metadata_keys_with_true_values` config option
  to `true`, you can specify metadata using only symbols.

  Scenario: Use alias_example_to to define focused example
    Given a file named "alias_example_to_spec.rb" with:
      """
      RSpec.configure do |c|
        c.alias_example_to :fit, :focused => true
        c.filter_run :focused => true
      end

      describe "an example group" do
        it "does one thing" do
        end

        fit "does another thing" do
        end
      end
      """
    When I run `rspec alias_example_to_spec.rb --format doc`
    Then the output should contain "does another thing"
    And the output should not contain "does one thing"

  Scenario: use symbols as metadata
    Given a file named "use_symbols_as_metadata_spec.rb" with:
      """
      RSpec.configure do |c|
        c.treat_symbols_as_metadata_keys_with_true_values = true
        c.alias_example_to :fit, :focused
        c.filter_run :focused
      end

      describe "an example group" do
        it "does one thing" do
        end

        fit "does another thing" do
        end
      end
      """
    When I run `rspec use_symbols_as_metadata_spec.rb --format doc`
    Then the output should contain "does another thing"
    And the output should not contain "does one thing"

Version data entries

158 entries across 103 versions & 14 rubygems

Version Path
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
classicCMS-0.2.3 vendor/bundle/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
classicCMS-0.2.2 vendor/bundle/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
classicCMS-0.2.1 vendor/bundle/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
classicCMS-0.2.0 vendor/bundle/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
classicCMS-0.1.2 vendor/bundle/gems/rspec-core-2.9.0/features/configuration/alias_example_to.feature
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/rspec-core-2.8.0/features/configuration/alias_example_to.feature
rspec-core-2.9.0 features/configuration/alias_example_to.feature
rspec-core-2.9.0.rc2 features/configuration/alias_example_to.feature
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.8.0/features/configuration/alias_example_to.feature
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/alias_example_to.feature
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.8.0/features/configuration/alias_example_to.feature
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/alias_example_to.feature
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/alias_example_to.feature
rspec-core-2.8.0 features/configuration/alias_example_to.feature
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-core-2.7.1/features/configuration/alias_example_to.feature