Browse files

yield_unless_standalone.sub(/^yield_/,'')

  • Loading branch information...
1 parent a51efc7 commit 58a2db4c6b4d21e7e38a5d740b7f1248d2e66890 @dchelimsky dchelimsky committed Dec 2, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/rspec/core/filter_manager.rb
View
8 lib/rspec/core/filter_manager.rb
@@ -152,15 +152,15 @@ def exclude?(example)
end
def include(*args)
- yield_unless_standalone(*args) { merge(@inclusions, @exclusions, *args) }
+ unless_standalone(*args) { merge(@inclusions, @exclusions, *args) }
end
def include!(*args)
- yield_unless_standalone(*args) { replace(@inclusions, @exclusions, *args) }
+ unless_standalone(*args) { replace(@inclusions, @exclusions, *args) }
end
def include_with_low_priority(*args)
- yield_unless_standalone(*args) { reverse_merge(@inclusions, @exclusions, *args) }
+ unless_standalone(*args) { reverse_merge(@inclusions, @exclusions, *args) }
end
def include?(example)
@@ -169,7 +169,7 @@ def include?(example)
private
- def yield_unless_standalone(*args)
+ def unless_standalone(*args)
is_standalone_filter?(args.last) ? @inclusions.replace(args.last) : yield unless already_set_standalone_filter?
end

0 comments on commit 58a2db4

Please sign in to comment.