shoulda-let 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shoulda-let (0.0.2)
4
+ shoulda-let (0.0.3)
5
5
  shoulda
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/shoulda-let
3
3
  specs:
4
- shoulda-let (0.0.2)
4
+ shoulda-let (0.0.3)
5
5
  shoulda
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/shoulda-let
3
3
  specs:
4
- shoulda-let (0.0.2)
4
+ shoulda-let (0.0.3)
5
5
  shoulda
6
6
 
7
7
  GEM
@@ -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
- instance_class = (Shoulda::VERSION >= "3.0.0" ? Test::Unit::TestCase : Shoulda::InstanceMethods)
17
- instance_class.class_eval do
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
@@ -1,6 +1,6 @@
1
1
  name = "shoulda-let"
2
2
 
3
- Gem::Specification.new name, "0.0.2" do |s|
3
+ Gem::Specification.new name, "0.0.3" do |s|
4
4
  s.summary = "A simple let for shoulda"
5
5
  s.authors = ["Michael Grosser"]
6
6
  s.email = "michael@grosser.it"
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.2
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: -375726372463278070
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: -375726372463278070
73
+ hash: -3119661042567922531
74
74
  requirements: []
75
75
  rubyforge_project:
76
76
  rubygems_version: 1.8.24