mack-orm 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mack-orm/test_extensions.rb +20 -22
  2. metadata +2 -2
@@ -1,6 +1,3 @@
1
- require "test/unit"
2
- require 'spec'
3
-
4
1
  if Mack.env == "test"
5
2
  module Mack
6
3
  module Testing # :nodoc:
@@ -8,9 +5,8 @@ if Mack.env == "test"
8
5
  end
9
6
 
10
7
  # Wrap it so we don't accidentally alias the run method n times and run out of db connections!
11
- unless Mack::Testing.const_defined?("ORM_LOADED")
12
-
13
- ORM_LOADED = true
8
+ run_once do
9
+
14
10
  module Mack
15
11
  module Testing
16
12
 
@@ -54,26 +50,28 @@ if Mack.env == "test"
54
50
  end # Example
55
51
  end # Spec
56
52
 
57
- module Test # :nodoc:
58
- module Unit # :nodoc:
59
- class TestCase # :nodoc:
60
- include Mack::Testing
53
+ unless v1_9?
54
+ module Test # :nodoc:
55
+ module Unit # :nodoc:
56
+ class TestCase # :nodoc:
57
+ include Mack::Testing
61
58
 
62
- # Let's alias the run method in the class above us so we can create a new one here
63
- # but still reference it.
64
- alias_instance_method :run, :mack_test_case_run # :nodoc:
59
+ # Let's alias the run method in the class above us so we can create a new one here
60
+ # but still reference it.
61
+ alias_instance_method :run, :mack_test_case_run # :nodoc:
65
62
 
66
- # We need to wrap the run method so we can do things like
67
- # run a cleanup method if it exists
68
- def run(result, &progress_block) # :nodoc:
69
- rollback_transaction do
70
- mack_test_case_run(result, &progress_block)
63
+ # We need to wrap the run method so we can do things like
64
+ # run a cleanup method if it exists
65
+ def run(result, &progress_block) # :nodoc:
66
+ rollback_transaction do
67
+ mack_test_case_run(result, &progress_block)
68
+ end
71
69
  end
72
- end
73
70
 
74
- end # TestCase
75
- end # Unit
76
- end # Test
71
+ end # TestCase
72
+ end # Unit
73
+ end # Test
74
+ end
77
75
 
78
76
  end
79
77
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack-orm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-30 00:00:00 -05:00
12
+ date: 2009-01-18 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15