shoulda-let 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  gem "bump"
data/Gemfile.lock CHANGED
@@ -1,34 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shoulda-let (0.0.4)
4
+ shoulda-let (0.0.5)
5
5
  shoulda
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (3.2.9)
11
- i18n (~> 0.6)
10
+ activesupport (3.2.13)
11
+ i18n (= 0.6.1)
12
12
  multi_json (~> 1.0)
13
13
  appraisal (0.5.1)
14
14
  bundler
15
15
  rake
16
- bourne (1.1.2)
17
- mocha (= 0.10.5)
16
+ bourne (1.4.0)
17
+ mocha (~> 0.13.2)
18
18
  bump (0.3.7)
19
19
  i18n (0.6.1)
20
20
  metaclass (0.0.1)
21
- mocha (0.10.5)
21
+ mocha (0.13.3)
22
22
  metaclass (~> 0.0.1)
23
- multi_json (1.5.0)
23
+ multi_json (1.7.3)
24
24
  rake (10.0.2)
25
- shoulda (3.3.2)
26
- shoulda-context (~> 1.0.1)
27
- shoulda-matchers (~> 1.4.1)
28
- shoulda-context (1.0.1)
29
- shoulda-matchers (1.4.2)
25
+ shoulda (3.4.0)
26
+ shoulda-context (~> 1.0, >= 1.0.1)
27
+ shoulda-matchers (~> 1.0, >= 1.4.1)
28
+ shoulda-context (1.1.1)
29
+ shoulda-matchers (1.5.6)
30
30
  activesupport (>= 3.0.0)
31
- bourne (~> 1.1.2)
31
+ bourne (~> 1.3)
32
32
  test-unit (2.5.3)
33
33
 
34
34
  PLATFORMS
data/Readme.md CHANGED
@@ -85,7 +85,12 @@ Usage
85
85
  <!-- example -->
86
86
  Author
87
87
  ======
88
+
89
+ ### [Contributors](https://github.com/grosser/shoulda-let/contributors)
90
+ - [James Rosen](https://github.com/jamesarosen)
91
+ - [Steven Davidovitz](https://github.com/steved555)
92
+
88
93
  [Michael Grosser](http://grosser.it)<br/>
89
94
  michael@grosser.it<br/>
90
95
  License: MIT<br/>
91
- [![Build Status](https://secure.travis-ci.org/grosser/shoulda-let.png)](http://travis-ci.org/grosser/shoulda-let)
96
+ [![Build Status](https://travis-ci.org/grosser/shoulda-let.png)](http://travis-ci.org/grosser/shoulda-let)
@@ -1,6 +1,6 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source :rubygems
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "bump"
6
6
  gem "rake"
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/shoulda-let
3
3
  specs:
4
- shoulda-let (0.0.3)
4
+ shoulda-let (0.0.4)
5
5
  shoulda
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
10
  appraisal (0.4.1)
11
11
  bundler
@@ -1,6 +1,6 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source :rubygems
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "bump"
6
6
  gem "rake"
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/shoulda-let
3
3
  specs:
4
- shoulda-let (0.0.3)
4
+ shoulda-let (0.0.4)
5
5
  shoulda
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
10
  activesupport (3.2.8)
11
11
  i18n (~> 0.6)
@@ -1,6 +1,5 @@
1
1
  module Shoulda
2
2
  module Let
3
-
4
3
  module ContextSupport
5
4
  # setup method used outside of should blocks
6
5
  # let(:foo){ "Foo" }
@@ -21,10 +20,9 @@ module Shoulda
21
20
 
22
21
  def let_defined?(name)
23
22
  name = name.to_sym
24
- ( @let && @let.has_key?(name) ) ||
25
- ( parent.respond_to?(:let_defined?) && parent.let_defined?(name) )
23
+ ( @let and @let.has_key?(name) ) ||
24
+ ( parent.respond_to?(:let_defined?) and parent.let_defined?(name) )
26
25
  end
27
26
  end
28
-
29
27
  end
30
28
  end
@@ -1,6 +1,5 @@
1
1
  module Shoulda
2
2
  module Let
3
-
4
3
  module TestCaseSupport
5
4
  # instance method used inside of should block
6
5
  # assert_equal @result, let(:foo)
@@ -11,7 +10,7 @@ module Shoulda
11
10
 
12
11
  def method_missing(name, *arguments, &block)
13
12
  name = name.to_sym
14
- if arguments.length == 0 && block.nil? && @shoulda_context.let_defined?(name)
13
+ if @shoulda_context && arguments.length == 0 && !block && @shoulda_context.let_defined?(name)
15
14
  let(name)
16
15
  else
17
16
  super
@@ -19,10 +18,8 @@ module Shoulda
19
18
  end
20
19
 
21
20
  def respond_to?(name, *arguments, &block)
22
- ( @shoulda_context && @shoulda_context.let_defined?(name) ) || super
21
+ ( @shoulda_context and @shoulda_context.let_defined?(name) ) or super
23
22
  end
24
-
25
23
  end
26
-
27
24
  end
28
25
  end
data/shoulda-let.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  name = "shoulda-let"
2
2
 
3
- Gem::Specification.new name, "0.0.4" do |s|
3
+ Gem::Specification.new name, "0.0.5" do |s|
4
4
  s.summary = "A simple let for shoulda"
5
5
  s.authors = ["Michael Grosser"]
6
6
  s.email = "michael@grosser.it"
@@ -7,4 +7,15 @@ class ShouldaLetTest < Test::Unit::TestCase
7
7
  example = File.read(File.expand_path("../../Readme.md", __FILE__)).match(/<!-- example -->(.*)<!-- example -->/m)[1]
8
8
  eval example
9
9
  end
10
+
11
+ should "pass through to regular Test::Unit::TestCase method_missing" do
12
+ begin
13
+ undefined_let
14
+ rescue NoMethodError
15
+ flunk
16
+ rescue NameError
17
+ else
18
+ flunk
19
+ end
20
+ end
10
21
  end
metadata CHANGED
@@ -1,32 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-let
3
3
  version: !ruby/object:Gem::Version
4
+ version: 0.0.5
4
5
  prerelease:
5
- version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Grosser
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-12 00:00:00.000000000 Z
12
+ date: 2013-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ name: shoulda
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
- none: false
22
+ type: :runtime
21
23
  prerelease: false
22
- name: shoulda
23
- requirement: !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ! '>='
26
28
  - !ruby/object:Gem::Version
27
29
  version: '0'
28
- none: false
29
- type: :runtime
30
30
  description:
31
31
  email: michael@grosser.it
32
32
  executables: []
@@ -56,26 +56,26 @@ rdoc_options: []
56
56
  require_paths:
57
57
  - lib
58
58
  required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
59
60
  requirements:
60
61
  - - ! '>='
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
64
  segments:
64
65
  - 0
65
- hash: 4444769857253889543
66
- none: false
66
+ hash: 2850818248656912426
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
68
69
  requirements:
69
70
  - - ! '>='
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0'
72
73
  segments:
73
74
  - 0
74
- hash: 4444769857253889543
75
- none: false
75
+ hash: 2850818248656912426
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 1.8.24
78
+ rubygems_version: 1.8.25
79
79
  signing_key:
80
80
  specification_version: 3
81
81
  summary: A simple let for shoulda