schmurfy-bacon 1.5.3 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8c4606bfbda72c7fcf49a99fe922334888c3884
4
- data.tar.gz: 21a3c5248763ee722e7ab07fce931fb9ac76aca0
3
+ metadata.gz: 61b1f7ea4a95352d50b2f7cdb1455a45d9a5312b
4
+ data.tar.gz: d2303924ce415dc179167b8d7a491da113bf7b79
5
5
  SHA512:
6
- metadata.gz: 8e8d53dae0d00c397170bb8a21a87304107f50d1fa3c4963b3e4696364d3dcf9e4be375115c67a98cfa11e9d1c8691efaa5c55127564bc256c184e646d6f363f
7
- data.tar.gz: 40d825826b0a928bbcbcb63997cf0b9f899fb565fd2352a48d71c22d7a5d127f27b54bccb928b1ee1f7b896c5b0309ff445fa45de7b7ff51155d796f86355134
6
+ metadata.gz: f16c418b4f56e63812bb1fc314a71f07738d7293edcf2851c22bd79c7218abb2cdc887bb25d094da24ce3ba53ec4893e231082539325ae4cdc2eef6c956a3d3d
7
+ data.tar.gz: 0eb90bc3a3409b0535f43bbd05ce14bb0ac4dc5a018481984e1e0d0e9599380489a81a5c21ab7b9df5efd7cd5335b740a5c00b88fa5813c23543c465abe5fe90
@@ -61,9 +61,10 @@ module Bacon
61
61
 
62
62
  def self.summary_on_exit
63
63
  return if Counter[:installed_summary] > 0
64
- started_at = Time.now
64
+ interval = Hitimes::Interval.new
65
+ interval.start()
65
66
  at_exit {
66
- handle_summary(started_at)
67
+ handle_summary(interval.stop())
67
68
  if $!
68
69
  raise $!
69
70
  elsif Counter[:errors] + Counter[:failed] > 0
@@ -86,7 +87,7 @@ module Bacon
86
87
  def self.store_error(e, description)
87
88
  ErrorLog << "#{e.class}: #{e.message}\n"
88
89
 
89
- backtrace = e.backtrace.find_all { |line| line !~ /bin\/bacon|\/bacon\.rb:\d+/ && line !~ /guard|fsevent|thor/ }
90
+ backtrace = e.backtrace.find_all { |line| line !~ /guard|fsevent|thor|bacon/ }
90
91
  backtrace = backtrace[0, Bacon.backtrace_size] if Bacon.backtrace_size
91
92
 
92
93
  backtrace.each_with_index do |line, i|
@@ -185,11 +186,11 @@ module Bacon
185
186
  names.each { |name| instance_eval(&Shared[name]) }
186
187
  end
187
188
 
188
- def should(*args, &block)
189
+ def should(label, *args, &block)
189
190
  if Counter[:depth]==0
190
- it('should '+args.first,&block)
191
+ it("should #{label}",&block)
191
192
  else
192
- super(*args,&block)
193
+ super(label, *args,&block)
193
194
  end
194
195
  end
195
196
 
@@ -43,8 +43,6 @@ module Bacon
43
43
  mocha_setup
44
44
  block.call
45
45
  mocha_verify(MochaRequirementsCounter)
46
- rescue Mocha::ExpectationError => e
47
- raise Error.new(:failed, "#{e.message}\n#{e.backtrace[0...10].join("\n")}")
48
46
  ensure
49
47
  mocha_teardown
50
48
  end
@@ -1,3 +1,3 @@
1
1
  module Bacon
2
- VERSION = "1.5.3"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -38,10 +38,13 @@ module BetterOutput
38
38
 
39
39
  end
40
40
 
41
- def handle_summary(started_at)
42
- elapsed_time = Time.now.to_i - started_at.to_i
41
+ def handle_summary(elapsed_time)
43
42
  print ErrorLog if Backtraces
44
- puts "Execution time: #{human_duration(elapsed_time)}"
43
+ if elapsed_time < 1
44
+ puts "Execution time: #{elapsed_time * 1000} ms"
45
+ else
46
+ puts "Execution time: #{human_duration(elapsed_time)}"
47
+ end
45
48
  puts "%d specifications (%d requirements), %d failures, %d errors" %
46
49
  Counter.values_at(:specifications, :requirements, :failed, :errors)
47
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schmurfy-bacon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-08 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.2.2
101
+ rubygems_version: 2.4.5.1
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: a small RSpec clone