Sha256: c7555d95727bf2688dccc500e4990a7582b9323417965cf707417797dc824d30
Contents?: true
Size: 1.05 KB
Versions: 16
Compression:
Stored size: 1.05 KB
Contents
module InspecPlugins::<%= module_name %> # This class will provide the actual Streaming Reporter implementation. # Its superclass is provided by another call to Inspec.plugin, # this time with two args. The first arg specifies we are requesting # version 2 of the Plugins API. The second says we are making a # Streaming Reporter plugin component, so please make available any DSL needed # for that. class StreamingReporter < Inspec.plugin(2, :streaming_reporter) # Registering these methods with RSpec::Core::Formatters class is mandatory RSpec::Core::Formatters.register self, :example_passed, :example_failed, :example_pending def initialize(output) @output = output end def example_passed(notification) # ExampleNotification # some logic to run on passing test case end def example_failed(notification) # FailedExampleNotification # some logic to run on failing test case end def example_pending(notification) # ExampleNotification # some logic to run on pending test case end end end
Version data entries
16 entries across 16 versions & 1 rubygems