Sha256: 38d864699ece9d5f87af666f90cf84c9bad0157bfc9a798d5ef8c0ff808ed5ec

Contents?: true

Size: 1.36 KB

Versions: 31

Compression:

Stored size: 1.36 KB

Contents

Feature: conditional exclusion of example groups
  
  Example groups can be excluded from a run by matching the value of the
  --exclude argument against options passed to an example group. The value
  can be a key or a key:value pair (separated by a ":").
  
  Scenario: exclusion using explicit value
    Given the following spec:
      """
      describe "This should run" do
        it { 5.should == 5 }
      end
      
      describe "This should not run", :slow => true do
        it { 1_000_000.times { 5.should == 5 } }
      end
      """
    When I run it with the spec command --format specdoc --exclude slow:true
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures"
    And the stdout should match /This should run$/m
    But the stdout should not match "This should not run"

  Scenario: exclusion using default value (true)
    Given the following spec:
      """
      describe "This should run" do
        it { 5.should == 5 }
      end

      describe "This should not run", :slow => true do
        it { 1_000_000.times { 5.should == 5 } }
      end
      """
    When I run it with the spec command --format specdoc --exclude slow
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures"
    And the stdout should match /This should run$/m
    But the stdout should not match "This should not run"

Version data entries

31 entries across 31 versions & 9 rubygems

Version Path
dchelimsky-rspec-1.1.99.1 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.13 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.2 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.3 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.4 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.5 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.6 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.7 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.8 features-pending/cli/conditional_exclusion.feature
dchelimsky-rspec-1.1.99.9 features-pending/cli/conditional_exclusion.feature
rspec-instructure-1.3.3 features-pending/cli/conditional_exclusion.feature
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/features-pending/cli/conditional_exclusion.feature
rspec-1.3.2 features-pending/cli/conditional_exclusion.feature
hubbub-0.0.11 lib/vendor/plugins/rspec/features-pending/cli/conditional_exclusion.feature
hubbub-0.0.10 lib/vendor/plugins/rspec/features-pending/cli/conditional_exclusion.feature
hubbub-0.0.9 lib/vendor/plugins/rspec/features-pending/cli/conditional_exclusion.feature
hubbub-0.0.8 lib/vendor/plugins/rspec/features-pending/cli/conditional_exclusion.feature
hubbub-0.0.6 lib/vendor/plugins/rspec/features-pending/cli/conditional_exclusion.feature
media-path-0.1.2 vendor/rspec/features-pending/cli/conditional_exclusion.feature
simple-templater-0.0.1.3 vendor/rspec/features-pending/cli/conditional_exclusion.feature