Module: Chartspec

Defined in:
lib/chartspec.rb,
lib/chartspec/version.rb

Defined Under Namespace

Classes: Formatter

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/chartspec.rb', line 9

def self.run argv
  config = RSpec.configuration
  formatter = Formatter.new config.output_stream
  reporter = RSpec::Core::Reporter.new(config)
  config.instance_variable_set :@reporter, reporter
  loader = config.send :formatter_loader
  notifications = loader.send :notifications_for, Formatter
  reporter.register_listener formatter, *notifications
  RSpec::Core::Runner::run [argv]
end