Module: RSpec::Core::World::Describable
- Defined in:
- lib/rspec/core/world.rb
Constant Summary collapse
- PROC_HEX_NUMBER =
/0x[0-9a-f]+@/
- PROJECT_DIR =
File.('.')
Instance Method Summary collapse
- #description ⇒ Object
- #empty? ⇒ Boolean
- #empty_without_conditional_filters? ⇒ Boolean
- #reject ⇒ Object
Instance Method Details
#description ⇒ Object
9 10 11 |
# File 'lib/rspec/core/world.rb', line 9 def description reject { |k, v| RSpec::Core::Configuration::CONDITIONAL_FILTERS[k] == v }.inspect.gsub(PROC_HEX_NUMBER, '').gsub(PROJECT_DIR, '.').gsub(' (lambda)','') end |
#empty? ⇒ Boolean
21 22 23 |
# File 'lib/rspec/core/world.rb', line 21 def empty? super rescue false end |
#empty_without_conditional_filters? ⇒ Boolean
13 14 15 |
# File 'lib/rspec/core/world.rb', line 13 def empty_without_conditional_filters? reject { |k, v| RSpec::Core::Configuration::CONDITIONAL_FILTERS[k] == v }.empty? end |
#reject ⇒ Object
17 18 19 |
# File 'lib/rspec/core/world.rb', line 17 def reject super rescue {} end |