Class: RSpec::RequestableExamples::RequestedExamples
- Inherits:
-
Array
- Object
- Array
- RSpec::RequestableExamples::RequestedExamples
- Defined in:
- lib/rspec/requestable-examples.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ RequestedExamples
constructor
A new instance of RequestedExamples.
- #run?(example) ⇒ Boolean
Constructor Details
#initialize(options) ⇒ RequestedExamples
Returns a new instance of RequestedExamples.
6 7 8 9 10 |
# File 'lib/rspec/requestable-examples.rb', line 6 def initialize() ||= {} @do_not_run_any_examples = true if [:examples] == [] replace [:examples] || [] end |
Instance Method Details
#run?(example) ⇒ Boolean
12 13 14 15 16 |
# File 'lib/rspec/requestable-examples.rb', line 12 def run?(example) return false if @do_not_run_any_examples return true if empty? || include?(example) false end |