class MRspec::Configuration
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/mrspec/configuration.rb, line 7 def initialize(*) super # Turn color on by default, b/c everyone I know that uses it uses colour, so make it opt-out rather than opt-in # https://github.com/JoshCheek/mrspec/issues/12 # Defaulted here: https://github.com/rspec/rspec-core/blob/44afa9bd83e655b4d1fa60c0d73373a754aa479b/lib/rspec/core/configuration.rb#L367 # Exposed here: https://github.com/rspec/rspec-core/blob/44afa9bd83e655b4d1fa60c0d73373a754aa479b/lib/rspec/core/configuration.rb#L715-L722 @color = true disable_monkey_patching! filter_gems_from_backtrace 'mrspec', 'minitest', 'interception', 'what_weve_got_here_is_an_error_to_communicate' self.pattern = pattern.sub '*_spec.rb', '{*_spec,*_test,test_*}.rb' self.default_formatter = WhatWeveGotHereIsAnErrorToCommunicate::RSpecFormatter WhatWeveGotHereIsAnErrorToCommunicate::ExceptionRecorder.record_exception_bindings(self) [Module, TOPLEVEL_BINDING.eval('self').singleton_class].each do |klass| klass.class_eval do def describe(*args, &block) Kernel.instance_method(:describe).bind(self).call(*args, &block) end end end end
Public Instance Methods
add_formatter(*args)
click to toggle source
Calls superclass method
# File lib/mrspec/configuration.rb, line 35 def add_formatter(*args) if args.any? { |formatter| formatter == 'w' || formatter =~ /^what/ } super WhatWeveGotHereIsAnErrorToCommunicate::RSpecFormatter else super end end
describe(*args, &block)
click to toggle source
# File lib/mrspec/configuration.rb, line 23 def describe(*args, &block) Kernel.instance_method(:describe).bind(self).call(*args, &block) end
load_spec_files(*)
click to toggle source
Calls superclass method
# File lib/mrspec/configuration.rb, line 30 def load_spec_files(*) super MRspec::DeclareMinitests.call(RSpec, Minitest, Minitest::Runnable.runnables) end