Skip to content

Commit

Permalink
Report the exclusion filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Maddox committed Apr 16, 2011
1 parent 029e697 commit eae6b43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions features/command_line/tag.feature
Expand Up @@ -58,17 +58,27 @@ Feature: --tag option

Scenario: exclude examples with a simple tag
When I run `rspec . --tag ~skip`
Then the output should contain "Run filtered excluding {:skip=>true}"
Then the examples should all pass

Scenario: exclude examples with a simple tag and @
When I run `rspec . --tag ~@skip`
Then the output should contain "Run filtered excluding {:skip=>true}"
Then the examples should all pass

Scenario: exclude examples with a name:value tag
When I run `rspec . --tag ~speed:slow`
Then the output should contain:
"""
Run filtered excluding {:speed=>"slow"}
"""
Then the examples should all pass

Scenario: exclude examples with a name:value tag and @
When I run `rspec . --tag ~@speed:slow`
Then the output should contain:
"""
Run filtered excluding {:speed=>"slow"}
"""
Then the examples should all pass

2 changes: 2 additions & 0 deletions lib/rspec/core/world.rb
Expand Up @@ -76,6 +76,8 @@ def announce_exclusion_filter
@configuration.reporter.message(
"No examples were matched. Perhaps #{exclusion_filter.inspect} is excluding everything?")
example_groups.clear
else
@configuration.reporter.message "Run filtered excluding #{exclusion_filter.inspect}"
end
end

Expand Down

0 comments on commit eae6b43

Please sign in to comment.