running_man 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,13 +37,18 @@ module RunningMan
37
37
  # Open a new transaction before running any test.
38
38
  def setup_transaction
39
39
  ActiveRecord::Base.connection.increment_open_transactions
40
+ if ActiveRecord::Base.connection.repond_to?(:transaction_joinable=)
41
+ ActiveRecord::Base.connection.transaction_joinable = false
42
+ end
40
43
  ActiveRecord::Base.connection.begin_db_transaction
41
44
  end
42
45
 
43
46
  # Rollback our transaction, returning our fixtures to a pristine state.
44
47
  def teardown_transaction
45
- ActiveRecord::Base.connection.rollback_db_transaction
46
- ActiveRecord::Base.connection.decrement_open_transactions
48
+ if ActiveRecord::Base.connection.open_transactions != 0
49
+ ActiveRecord::Base.connection.rollback_db_transaction
50
+ ActiveRecord::Base.connection.decrement_open_transactions
51
+ end
47
52
  ActiveRecord::Base.clear_active_connections!
48
53
  end
49
54
 
data/lib/running_man.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
2
2
 
3
3
  module RunningMan
4
- VERSION = '0.3.9'
4
+ VERSION = '0.3.10'
5
5
 
6
6
  # Public: Sets up any helper class methods in TestClassMethods on the
7
7
  # specified test case class.
data/running_man.gemspec CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'running_man'
16
- s.version = '0.3.9'
17
- s.date = '2012-05-23'
16
+ s.version = '0.3.10'
17
+ s.date = '2012-08-09'
18
18
  s.rubyforge_project = 'running_man'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
metadata CHANGED
@@ -1,32 +1,22 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: running_man
3
- version: !ruby/object:Gem::Version
4
- hash: 1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.10
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 9
10
- version: 0.3.9
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - rick
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-05-23 00:00:00 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: Simple class for test/unit setup blocks that run just once.
22
15
  email: technoweenie@gmail.com
23
16
  executables: []
24
-
25
17
  extensions: []
26
-
27
18
  extra_rdoc_files: []
28
-
29
- files:
19
+ files:
30
20
  - LICENSE
31
21
  - README.md
32
22
  - Rakefile
@@ -40,38 +30,29 @@ files:
40
30
  - test/test_helper.rb
41
31
  homepage: http://github.com/technoweenie/running_man
42
32
  licenses: []
43
-
44
33
  post_install_message:
45
34
  rdoc_options: []
46
-
47
- require_paths:
35
+ require_paths:
48
36
  - lib
49
- required_ruby_version: !ruby/object:Gem::Requirement
37
+ required_ruby_version: !ruby/object:Gem::Requirement
50
38
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
44
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- hash: 3
64
- segments:
65
- - 0
66
- version: "0"
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
67
49
  requirements: []
68
-
69
50
  rubyforge_project: running_man
70
- rubygems_version: 1.8.10
51
+ rubygems_version: 1.8.23
71
52
  signing_key:
72
53
  specification_version: 2
73
54
  summary: Simple class for test/unit setup blocks that run just once.
74
- test_files:
55
+ test_files:
75
56
  - test/running_man/active_record_block_test.rb
76
57
  - test/running_man/block_helper_test.rb
77
58
  - test/running_man/block_test.rb