class RSpec::Puppet::EventListener
Public Class Methods
current_example()
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 48 def self.current_example @current_example end
example_failed(example)
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 32 def self.example_failed(example) @rspec_puppet_example = false end
example_passed(example)
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 24 def self.example_passed(example) @rspec_puppet_example = false end
example_pending(example)
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 28 def self.example_pending(example) @rspec_puppet_example = false end
example_started(example)
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 11 def self.example_started(example) if rspec3? @rspec_puppet_example = example.example.example_group.ancestors.include?(RSpec::Puppet::Support) @current_example = example.example if !@current_example.respond_to?(:environment) && @current_example.respond_to?(:example_group_instance) @current_example = @current_example.example_group_instance end else @rspec_puppet_example = example.example_group.ancestors.include?(RSpec::Puppet::Support) @current_example = example end end
rspec3?()
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 40 def self.rspec3? if @rspec3.nil? @rspec3 = defined?(RSpec::Core::Notifications) end @rspec3 end
rspec_puppet_example?()
click to toggle source
# File lib/rspec-puppet/monkey_patches.rb, line 36 def self.rspec_puppet_example? @rspec_puppet_example || false end