shoulda-context 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,34 @@
1
- if !defined?(Test::Unit::TestCase)
2
- require 'test/unit/testcase'
1
+ begin
2
+ # if present, then also loads MiniTest::Spec
3
+ ActiveSupport::TestCase
4
+ rescue
3
5
  end
4
6
 
7
+ if defined?([ActiveSupport::TestCase, MiniTest::Spec]) && (ActiveSupport::TestCase.ancestors.include?(MiniTest::Spec))
8
+ base_test_case = MiniTest::Spec
9
+ else
10
+ if !defined?(Test::Unit::TestCase)
11
+ require 'test/unit/testcase'
12
+ end
13
+ base_test_case = Test::Unit::TestCase
14
+ end
15
+
16
+
5
17
  require 'shoulda/context/version'
6
18
  require 'shoulda/context/proc_extensions'
7
19
  require 'shoulda/context/assertions'
8
20
  require 'shoulda/context/context'
9
21
  require 'shoulda/context/autoload_macros'
10
22
 
11
- class Test::Unit::TestCase
12
- include Shoulda::Context::Assertions
13
- include Shoulda::Context::InstanceMethods
14
- extend Shoulda::Context::ClassMethods
23
+
24
+ module ShouldaContextLoadable
25
+ def self.included(base)
26
+ base.class_eval do
27
+ include Shoulda::Context::Assertions
28
+ include Shoulda::Context::InstanceMethods
29
+ end
30
+ base.extend(Shoulda::Context::ClassMethods)
31
+ end
15
32
  end
33
+
34
+ base_test_case.class_eval { include ShouldaContextLoadable }
@@ -1,5 +1,5 @@
1
1
  module Shoulda
2
2
  module Context
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.1.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-context
3
3
  version: !ruby/object:Gem::Version
4
+ version: 1.1.1
4
5
  prerelease:
5
- version: 1.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - thoughtbot, inc.
@@ -14,88 +14,88 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2013-04-01 00:00:00.000000000 Z
17
+ date: 2013-04-13 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: appraisal
21
- type: :development
22
21
  requirement: !ruby/object:Gem::Requirement
22
+ none: false
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.5'
27
- none: false
27
+ type: :development
28
+ prerelease: false
28
29
  version_requirements: !ruby/object:Gem::Requirement
30
+ none: false
29
31
  requirements:
30
32
  - - ~>
31
33
  - !ruby/object:Gem::Version
32
34
  version: '0.5'
33
- none: false
34
- prerelease: false
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rails
37
- type: :development
38
37
  requirement: !ruby/object:Gem::Requirement
38
+ none: false
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 3.2.9
43
- none: false
43
+ type: :development
44
+ prerelease: false
44
45
  version_requirements: !ruby/object:Gem::Requirement
46
+ none: false
45
47
  requirements:
46
48
  - - '='
47
49
  - !ruby/object:Gem::Version
48
50
  version: 3.2.9
49
- none: false
50
- prerelease: false
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: mocha
53
- type: :development
54
53
  requirement: !ruby/object:Gem::Requirement
54
+ none: false
55
55
  requirements:
56
56
  - - ~>
57
57
  - !ruby/object:Gem::Version
58
58
  version: 0.9.10
59
- none: false
59
+ type: :development
60
+ prerelease: false
60
61
  version_requirements: !ruby/object:Gem::Requirement
62
+ none: false
61
63
  requirements:
62
64
  - - ~>
63
65
  - !ruby/object:Gem::Version
64
66
  version: 0.9.10
65
- none: false
66
- prerelease: false
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rake
69
- type: :development
70
69
  requirement: !ruby/object:Gem::Requirement
70
+ none: false
71
71
  requirements:
72
72
  - - ! '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
- none: false
75
+ type: :development
76
+ prerelease: false
76
77
  version_requirements: !ruby/object:Gem::Requirement
78
+ none: false
77
79
  requirements:
78
80
  - - ! '>='
79
81
  - !ruby/object:Gem::Version
80
82
  version: '0'
81
- none: false
82
- prerelease: false
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: test-unit
85
- type: :development
86
85
  requirement: !ruby/object:Gem::Requirement
86
+ none: false
87
87
  requirements:
88
88
  - - ~>
89
89
  - !ruby/object:Gem::Version
90
90
  version: 2.1.0
91
- none: false
91
+ type: :development
92
+ prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
94
+ none: false
93
95
  requirements:
94
96
  - - ~>
95
97
  - !ruby/object:Gem::Version
96
98
  version: 2.1.0
97
- none: false
98
- prerelease: false
99
99
  description: Context framework extracted from Shoulda
100
100
  email: support@thoughtbot.com
101
101
  executables:
@@ -150,23 +150,17 @@ rdoc_options: []
150
150
  require_paths:
151
151
  - lib
152
152
  required_ruby_version: !ruby/object:Gem::Requirement
153
+ none: false
153
154
  requirements:
154
155
  - - ! '>='
155
156
  - !ruby/object:Gem::Version
156
- segments:
157
- - 0
158
- hash: 2086514409947675977
159
157
  version: '0'
160
- none: false
161
158
  required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
162
160
  requirements:
163
161
  - - ! '>='
164
162
  - !ruby/object:Gem::Version
165
- segments:
166
- - 0
167
- hash: 2086514409947675977
168
163
  version: '0'
169
- none: false
170
164
  requirements: []
171
165
  rubyforge_project:
172
166
  rubygems_version: 1.8.23