Sha256: d27de1f413ad66ba2f4e56a3cdbf29cfc81d713b957522545ce039f9ba5a59de
Contents?: true
Size: 1.49 KB
Versions: 2
Compression:
Stored size: 1.49 KB
Contents
module Micronaut class Runner @@installed_at_exit ||= false def self.options @options ||= Micronaut::RunnerOptions.new(:color => true, :formatter => :progress) end def self.autorun at_exit { Micronaut::Runner.new.run(ARGV) ? exit(0) : exit(1) } unless @@installed_at_exit @@installed_at_exit = true end def options self.class.options end def run(args = []) @verbose = args.delete('-v') total_examples = Micronaut::World.behaviour_groups.inject(0) { |sum, eg| sum + eg.examples.size } old_sync, options.formatter.output.sync = options.formatter.output.sync, true if options.formatter.output.respond_to?(:sync=) options.formatter.start(total_examples) suite_success = true starts_at = Time.now Micronaut::World.behaviour_groups.each do |example_group| suite_success &= example_group.run(options.formatter) end duration = Time.now - starts_at options.formatter.end options.formatter.dump options.formatter.start_dump options.formatter.dump_pending options.formatter.dump_failures options.formatter.dump_summary(duration, total_examples, options.formatter.failed_examples.size, options.formatter.pending_examples.size) options.formatter.output.sync = old_sync if options.formatter.output.respond_to? :sync= suite_success end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spicycode-micronaut-0.0.6 | lib/micronaut/runner.rb |
spicycode-micronaut-0.0.7 | lib/micronaut/runner.rb |