Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created October 6, 2012 19:42
Show Gist options
  • Save dchelimsky/3845897 to your computer and use it in GitHub Desktop.
Save dchelimsky/3845897 to your computer and use it in GitHub Desktop.
RSpec::Core::FilterManager
#include
merges inclusions
overrides previous inclusions with (via merge)
deletes matching opposites
with :locations
clears previous inclusions
does nothing when :locations previously set
with :line_numbers
clears previous inclusions
does nothing when :line_numbers previously set
with :full_description
clears previous inclusions
does nothing when :full_description previously set
#include!
replaces existing inclusions
deletes matching opposites
#include_with_low_priority
ignores new inclusions if same key exists
ignores new inclusions if same key exists in opposite
keeps new inclusions if same key exists in opposite but values are different
#exclude
merges exclusions
overrides previous exclusions with (via merge)
deletes matching opposites
#exclude!
replaces existing exclusions
deletes matching opposites
#exclude_with_low_priority
ignores new exclusions if same key exists
ignores new exclusions if same key exists in opposite
keeps new exclusions if same key exists in opposite but values are different
#prune
includes objects with tags matching inclusions
excludes objects with tags matching exclusions
prefers exclusion when matches previously set inclusion
prefers inclusion when matches previously set exclusion
prefers previously set inclusion when exclusion matches but has lower priority
prefers previously set exclusion when inclusion matches but has lower priority
#inclusions#description
cleans up the description
#exclusions#description
cleans up the description
returns `{}` when it only contains the default filters
includes other filters
deprecates an overridden :if filter
deprecates an :if filter overridden with low priority
deprecates an overridden :unless filter
deprecates an :unless filter overridden with low priority
includes an overriden :if filter
includes an overriden :unless filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment