shared_should 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.5
1
+ 0.5.6
data/lib/shared_should.rb CHANGED
@@ -1,16 +1,17 @@
1
1
  require 'shoulda'
2
2
 
3
3
  class Shoulda::Context
4
- alias :method_mission_without_shared_method_check :method_missing
4
+ alias :method_missing_without_shared_method_check :method_missing
5
5
  def method_missing(method, *args, &blk)
6
6
  current_context = self
7
- while current_context && (current_context.kind_of?(Shoulda::Context) || current_context < Test::Unit::TestCase) do
7
+ while current_context.kind_of?(Shoulda::Context) || current_context < Test::Unit::TestCase do
8
8
  if Test::Unit::TestCase.shared_context_block_owner(current_context).shared_context_blocks[method.to_s]
9
9
  return current_context.send(method, args[0], self, &blk)
10
10
  end
11
+ break unless current_context.kind_of?(Shoulda::Context)
11
12
  current_context = current_context.parent
12
13
  end
13
- method_mission_without_shared_method_check(method, *args, &blk)
14
+ method_missing_without_shared_method_check(method, *args, &blk)
14
15
  end
15
16
  end
16
17
 
@@ -50,10 +51,6 @@ class Test::Unit::TestCase
50
51
  @@setup_blocks << setup_block
51
52
  end
52
53
 
53
- def self.parent
54
- nil
55
- end
56
-
57
54
  def setup_shared_values(name, initialization_block)
58
55
  self.shared_value = initialization_block.nil? ? nil : initialization_block.bind(self).call
59
56
  self.shared_name = name
@@ -290,6 +287,7 @@ module Shoulda::SharedContext
290
287
  return shared_setup_block
291
288
  end
292
289
  raise "Unable to find shared_setup_for('#{shared_name}')" if current_context.kind_of?(Class)
290
+ break unless current_context.kind_of?(Shoulda::Context)
293
291
  current_context = current_context.parent
294
292
  end
295
293
  raise "Unable to find shared_setup_for('#{shared_name}')"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shared_should}
8
- s.version = "0.5.5"
8
+ s.version = "0.5.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Pearce"]
12
- s.date = %q{2011-02-08}
12
+ s.date = %q{2011-02-18}
13
13
  s.description = %q{Share and reuse shoulds, contexts, and setup in Shoulda.}
14
14
  s.email = %q{michael.pearce@bookrenter.com}
15
15
  s.extra_rdoc_files = [
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.homepage = %q{http://github.com/michaelgpearce/shared_should}
34
34
  s.licenses = ["MIT"]
35
35
  s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.7}
36
+ s.rubygems_version = %q{1.4.0}
37
37
  s.summary = %q{Share and reuse shoulds, contexts, and setup in Shoulda.}
38
38
  s.test_files = [
39
39
  "test/helper.rb",
@@ -42,7 +42,6 @@ Gem::Specification.new do |s|
42
42
  ]
43
43
 
44
44
  if s.respond_to? :specification_version then
45
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
45
  s.specification_version = 3
47
46
 
48
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shared_should
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease: false
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 5
10
- version: 0.5.5
9
+ - 6
10
+ version: 0.5.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Pearce
@@ -15,11 +15,14 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-08 00:00:00 -08:00
18
+ date: 2011-02-18 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ name: shoulda
24
+ type: :development
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
26
  none: false
24
27
  requirements:
25
28
  - - ">="
@@ -28,12 +31,12 @@ dependencies:
28
31
  segments:
29
32
  - 0
30
33
  version: "0"
31
- type: :development
32
- name: shoulda
33
- prerelease: false
34
- version_requirements: *id001
34
+ requirement: *id001
35
35
  - !ruby/object:Gem::Dependency
36
- requirement: &id002 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ name: bundler
38
+ type: :development
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
40
  none: false
38
41
  requirements:
39
42
  - - ~>
@@ -44,12 +47,12 @@ dependencies:
44
47
  - 0
45
48
  - 0
46
49
  version: 1.0.0
47
- type: :development
48
- name: bundler
49
- prerelease: false
50
- version_requirements: *id002
50
+ requirement: *id002
51
51
  - !ruby/object:Gem::Dependency
52
- requirement: &id003 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ name: jeweler
54
+ type: :development
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
53
56
  none: false
54
57
  requirements:
55
58
  - - ~>
@@ -60,12 +63,12 @@ dependencies:
60
63
  - 5
61
64
  - 2
62
65
  version: 1.5.2
63
- type: :development
64
- name: jeweler
65
- prerelease: false
66
- version_requirements: *id003
66
+ requirement: *id003
67
67
  - !ruby/object:Gem::Dependency
68
- requirement: &id004 !ruby/object:Gem::Requirement
68
+ prerelease: false
69
+ name: rcov
70
+ type: :development
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
69
72
  none: false
70
73
  requirements:
71
74
  - - ">="
@@ -74,12 +77,12 @@ dependencies:
74
77
  segments:
75
78
  - 0
76
79
  version: "0"
77
- type: :development
78
- name: rcov
79
- prerelease: false
80
- version_requirements: *id004
80
+ requirement: *id004
81
81
  - !ruby/object:Gem::Dependency
82
- requirement: &id005 !ruby/object:Gem::Requirement
82
+ prerelease: false
83
+ name: shoulda
84
+ type: :runtime
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
83
86
  none: false
84
87
  requirements:
85
88
  - - ">="
@@ -88,12 +91,12 @@ dependencies:
88
91
  segments:
89
92
  - 0
90
93
  version: "0"
91
- type: :runtime
92
- name: shoulda
93
- prerelease: false
94
- version_requirements: *id005
94
+ requirement: *id005
95
95
  - !ruby/object:Gem::Dependency
96
- requirement: &id006 !ruby/object:Gem::Requirement
96
+ prerelease: false
97
+ name: shoulda
98
+ type: :development
99
+ version_requirements: &id006 !ruby/object:Gem::Requirement
97
100
  none: false
98
101
  requirements:
99
102
  - - ">="
@@ -102,10 +105,7 @@ dependencies:
102
105
  segments:
103
106
  - 0
104
107
  version: "0"
105
- type: :development
106
- name: shoulda
107
- prerelease: false
108
- version_requirements: *id006
108
+ requirement: *id006
109
109
  description: Share and reuse shoulds, contexts, and setup in Shoulda.
110
110
  email: michael.pearce@bookrenter.com
111
111
  executables: []
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements: []
159
159
 
160
160
  rubyforge_project:
161
- rubygems_version: 1.3.7
161
+ rubygems_version: 1.4.0
162
162
  signing_key:
163
163
  specification_version: 3
164
164
  summary: Share and reuse shoulds, contexts, and setup in Shoulda.