schmurfy-bacon 1.4.5 → 1.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3ffdee2a78efc761a6a0e327e71c723611e63fb
4
- data.tar.gz: 0447e3b8b523620c20e1bac6416194d0aa9698ba
3
+ metadata.gz: 3a64e56316d6aecec47e8fd2fe56a040036ffba7
4
+ data.tar.gz: 1ff4fe72bf97df2643e9b504dc2f33f99babc96d
5
5
  SHA512:
6
- metadata.gz: dbb5dc698ea5d7c4cdaac82697632b2a346376ec8a8c8e9775158c48587a5dffec768ab6fc59f73cd949c776bbb5fef84c81f0dce88d3799c82046d93b17713c
7
- data.tar.gz: c6a13da0fb90d95bea7e3c990cb407d195fa9a90a31f8ffef6ec3755d9f8561d3fa91076fb8efcce7ea1ce8cebfd60a96b78ea37fd6e69adc85ff14ee95bf276
6
+ metadata.gz: 656133042aab29a047851684d2eef52f35fffe6136bf31ae0677c95ca5fbfa5c2f383f757cccee5f03a26529347ccb835decc8fb604234ce47224bcc5fb40325
7
+ data.tar.gz: 2df22daf222cbfe308ca9a9671129629556ba4ddea24a411d23e3e934d660648794513e5ba6845f63710c39df11959c45f7d281d55718cb54bb85ea1829cdfcc
@@ -0,0 +1,22 @@
1
+
2
+ module Bacon
3
+ module DisableGC
4
+ def run(*)
5
+ if toplevel
6
+ GC.disable
7
+ end
8
+
9
+ super
10
+
11
+ if toplevel
12
+ GC.enable()
13
+ GC.start()
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ Context.send(:include, DisableGC)
20
+ end
21
+
22
+ puts "GC disabled during tests"
data/lib/bacon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bacon
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  end
data/lib/bacon.rb CHANGED
@@ -157,14 +157,15 @@ module Bacon
157
157
  end
158
158
 
159
159
  class Context
160
- attr_reader :name, :block
160
+ attr_reader :name, :block, :toplevel
161
161
 
162
162
  include ContextAssertions
163
163
 
164
- def initialize(name, &block)
164
+ def initialize(name, toplevel = false, &block)
165
165
  @name = name
166
166
  @before, @after = [], []
167
167
  @block = block
168
+ @toplevel = toplevel
168
169
  end
169
170
 
170
171
  def before(&block); @before << block; end
@@ -274,7 +275,7 @@ module Kernel
274
275
  def describe(*args, &block)
275
276
  Bacon::focus_name_regexp = //
276
277
  Bacon::focus_context_regexp = //
277
- Bacon::Context.new(args.join(' '), &block).run
278
+ Bacon::Context.new(args.join(' '), true, &block).run
278
279
  end
279
280
 
280
281
  def shared(name, &block) Bacon::Shared[name] = block 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.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-22 00:00:00.000000000 Z
11
+ date: 2013-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -54,6 +54,7 @@ files:
54
54
  - lib/bacon/ext/em.rb
55
55
  - lib/bacon/ext/http.rb
56
56
  - lib/bacon/ext/mocha.rb
57
+ - lib/bacon/ext/no_gc.rb
57
58
  - lib/bacon/version.rb
58
59
  - lib/output/better_output.rb
59
60
  - lib/output/knock_output.rb