Skip to content

Commit

Permalink
don't announce 'Running filtered' when there are no filters
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed May 8, 2011
1 parent 169c725 commit 9f62063
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/core/world.rb
Expand Up @@ -112,7 +112,7 @@ def announce_filters
reporter.message(
"No examples were matched. Perhaps #{exclusion_filter.description} is excluding everything?")
end
else
elsif !filter_announcements.empty?
reporter.message("Run filtered #{filter_announcements.join(', ')}")
end
end
Expand Down
11 changes: 11 additions & 0 deletions spec/rspec/core/world_spec.rb
Expand Up @@ -236,6 +236,17 @@ module RSpec::Core
end
end
end

context "with examples" do
before { world.stub(:example_count) { 1 } }

context "with no filters" do
it "does not announce" do
reporter.should_not_receive(:message)
world.announce_filters
end
end
end
end

describe "#inclusion_filter" do
Expand Down

0 comments on commit 9f62063

Please sign in to comment.