shoulda-let 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/gemfiles/shoulda2.gemfile.lock +1 -1
- data/gemfiles/shoulda3.gemfile.lock +1 -1
- data/lib/shoulda/let.rb +5 -2
- data/shoulda-let.gemspec +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/shoulda/let.rb
CHANGED
@@ -3,6 +3,8 @@ require "shoulda/context"
|
|
3
3
|
|
4
4
|
context_class = (Shoulda::VERSION >= "3.0.0" ? Shoulda::Context::Context : Shoulda::Context)
|
5
5
|
context_class.class_eval do
|
6
|
+
# setup method used outside of should blocks
|
7
|
+
# let(:foo){ "Foo" }
|
6
8
|
def let(name, &block)
|
7
9
|
@let ||= {}
|
8
10
|
if block
|
@@ -13,8 +15,9 @@ context_class.class_eval do
|
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
+
Test::Unit::TestCase.class_eval do
|
19
|
+
# instance method used inside of should block
|
20
|
+
# assert_equal @result, let(:foo)
|
18
21
|
def let(name)
|
19
22
|
@let ||= {}
|
20
23
|
@let.fetch(name) do
|
data/shoulda-let.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoulda-let
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -61,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
segments:
|
63
63
|
- 0
|
64
|
-
hash: -
|
64
|
+
hash: -3119661042567922531
|
65
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
segments:
|
72
72
|
- 0
|
73
|
-
hash: -
|
73
|
+
hash: -3119661042567922531
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
76
|
rubygems_version: 1.8.24
|