etest-unit 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/etest-unit.rb CHANGED
@@ -33,12 +33,23 @@ module EtestUnit
33
33
  def run_test(test, result)
34
34
  old_log_level = set_log_level(Logger::ERROR)
35
35
  ActiveRecord::Base.transaction do
36
- set_log_level(old_log_level)
36
+ begin
37
+ set_log_level(old_log_level)
37
38
 
38
- super(test, result)
39
+ if defined?(Mocha)
40
+ mocha_setup
41
+ end
42
+
43
+ super(test, result)
44
+ ensure
45
+ if defined?(Mocha)
46
+ mocha_verify
47
+ mocha_teardown
48
+ end
39
49
 
40
- set_log_level(Logger::ERROR)
41
- raise ActiveRecord::Rollback, "Rollback test transaction"
50
+ set_log_level(Logger::ERROR)
51
+ raise ActiveRecord::Rollback, "Rollback test transaction"
52
+ end
42
53
  end
43
54
  ensure
44
55
  set_log_level(old_log_level)
@@ -1,3 +1,3 @@
1
1
  module EtestUnit
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etest-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
@@ -53,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: -2665298691011624838
56
+ hash: 1929617669401661542
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  none: false
59
59
  requirements: