Class: RSpec::RequestableExamples::RequestedExamples

Inherits:
Array
  • Object
show all
Defined in:
lib/rspec/requestable-examples.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ RequestedExamples

Returns a new instance of RequestedExamples.



4
5
6
7
# File 'lib/rspec/requestable-examples.rb', line 4

def initialize(options)
  options ||= {}
  replace options[:examples] || []
end

Instance Method Details

#run?(example) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/rspec/requestable-examples.rb', line 9

def run?(example)
  return true if empty? || include?(example)
  false
end