shoulda-let 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a289a3b1500d9b0f412e06a054238e22108a8615
4
+ data.tar.gz: 0e73f9e5869b20d229e649569fee764467eee9cf
5
+ SHA512:
6
+ metadata.gz: 592db159d2873faf6c99e1bbf5e679bc713372b23d578ca300e463f9ba43ac2e4be32d6c8e3c985e3b8a63c7bfc981c15dd1f00e9a60a92117f3c9f49dde48a3
7
+ data.tar.gz: 4b49f0eeeba850f499c720db1febc1bedc2e3c3108a4a083a175cf94239036f611f2cf46930079b900311772b1cc926cb6846358c6a746070dad6728bcc0f6c1
@@ -8,6 +8,12 @@ context_class.class_eval do
8
8
  include Shoulda::Let::ContextSupport
9
9
  end
10
10
 
11
+ if defined?(MiniTest)
12
+ MiniTest::Unit::TestCase.class_eval do
13
+ include Shoulda::Let::TestCaseSupport
14
+ end
15
+ end
16
+
11
17
  Test::Unit::TestCase.class_eval do
12
18
  include Shoulda::Let::TestCaseSupport
13
19
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-let
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
- prerelease:
4
+ version: 0.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Grosser
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-03 00:00:00.000000000 Z
11
+ date: 2014-04-09 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: shoulda
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description:
@@ -33,50 +30,31 @@ executables: []
33
30
  extensions: []
34
31
  extra_rdoc_files: []
35
32
  files:
36
- - .travis.yml
37
- - Appraisals
38
- - Gemfile
39
- - Gemfile.lock
40
- - Rakefile
41
- - Readme.md
42
- - gemfiles/shoulda2.gemfile
43
- - gemfiles/shoulda2.gemfile.lock
44
- - gemfiles/shoulda3.gemfile
45
- - gemfiles/shoulda3.gemfile.lock
46
33
  - lib/shoulda/let.rb
47
34
  - lib/shoulda/let/context_support.rb
48
35
  - lib/shoulda/let/test_case_support.rb
49
- - shoulda-let.gemspec
50
- - test/shoulda_let_test.rb
51
36
  homepage: http://github.com/grosser/shoulda-let
52
37
  licenses:
53
38
  - MIT
39
+ metadata: {}
54
40
  post_install_message:
55
41
  rdoc_options: []
56
42
  require_paths:
57
43
  - lib
58
44
  required_ruby_version: !ruby/object:Gem::Requirement
59
- none: false
60
45
  requirements:
61
- - - ! '>='
46
+ - - ">="
62
47
  - !ruby/object:Gem::Version
63
48
  version: '0'
64
- segments:
65
- - 0
66
- hash: 2850818248656912426
67
49
  required_rubygems_version: !ruby/object:Gem::Requirement
68
- none: false
69
50
  requirements:
70
- - - ! '>='
51
+ - - ">="
71
52
  - !ruby/object:Gem::Version
72
53
  version: '0'
73
- segments:
74
- - 0
75
- hash: 2850818248656912426
76
54
  requirements: []
77
55
  rubyforge_project:
78
- rubygems_version: 1.8.25
56
+ rubygems_version: 2.2.2
79
57
  signing_key:
80
- specification_version: 3
58
+ specification_version: 4
81
59
  summary: A simple let for shoulda
82
60
  test_files: []
@@ -1,4 +0,0 @@
1
- rvm:
2
- - ree
3
- - 1.9.2
4
- - 1.9.3
data/Appraisals DELETED
@@ -1,7 +0,0 @@
1
- appraise "shoulda2" do
2
- gem 'shoulda', '~>2.11'
3
- end
4
-
5
- appraise "shoulda3" do
6
- gem 'shoulda', '~>3.1'
7
- end
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec
3
-
4
- gem "bump"
5
- gem "rake"
6
- gem "test-unit", ">=2.5.1"
7
- gem "appraisal"
@@ -1,42 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- shoulda-let (0.0.5)
5
- shoulda
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (3.2.13)
11
- i18n (= 0.6.1)
12
- multi_json (~> 1.0)
13
- appraisal (0.5.1)
14
- bundler
15
- rake
16
- bourne (1.4.0)
17
- mocha (~> 0.13.2)
18
- bump (0.3.7)
19
- i18n (0.6.1)
20
- metaclass (0.0.1)
21
- mocha (0.13.3)
22
- metaclass (~> 0.0.1)
23
- multi_json (1.7.3)
24
- rake (10.0.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
- activesupport (>= 3.0.0)
31
- bourne (~> 1.3)
32
- test-unit (2.5.3)
33
-
34
- PLATFORMS
35
- ruby
36
-
37
- DEPENDENCIES
38
- appraisal
39
- bump
40
- rake
41
- shoulda-let!
42
- test-unit (>= 2.5.1)
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- require 'appraisal'
2
- require 'bundler/gem_tasks'
3
- require 'bump/tasks'
4
-
5
- task :test do
6
- sh "ruby test/shoulda_let_test.rb"
7
- end
8
-
9
- task :default do
10
- sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
11
- end
data/Readme.md DELETED
@@ -1,96 +0,0 @@
1
- A simple let for shoulda
2
-
3
- Install
4
- =======
5
-
6
- gem install shoulda-let
7
-
8
- # Gemfile
9
- gem "shoulda-let", :require => "shoulda/let"
10
-
11
- Usage
12
- =====
13
- <!-- example -->
14
- context "let" do
15
- let(:thing){ "a thing" }
16
-
17
- should "make the result available via let" do
18
- assert_equal 'a thing', let(:thing)
19
- end
20
-
21
- should 'make the result available via an instance method' do
22
- assert_equal 'a thing', thing
23
- end
24
-
25
- context "memoization" do
26
- let(:thing) do
27
- @invocations ||= 0
28
- @invocations += 1
29
- rand
30
- end
31
-
32
- should "be stable" do
33
- first_value = thing
34
- assert_equal first_value, thing
35
- assert_equal first_value, let(:thing)
36
- end
37
-
38
- should 'not reevaluate' do
39
- thing; thing; thing
40
- assert_equal 1, @invocations
41
- end
42
- end
43
-
44
- context "a child context with an overridden let" do
45
- let(:thing) { 'child thing' }
46
-
47
- should "use the overridden value" do
48
- assert_equal "child thing", thing
49
- end
50
- end
51
-
52
- context 'a child context with no overridden let' do
53
- should 'use the parent value' do
54
- assert_equal 'a thing', thing
55
- end
56
- end
57
-
58
- context "let!" do
59
- let!(:thing) do
60
- @thing_instantiated = true
61
- 'anything'
62
- end
63
-
64
- should "automatically be evaluated" do
65
- assert @thing_instantiated
66
- end
67
-
68
- should 'otherwise work like let' do
69
- assert_equal 'anything', thing
70
- end
71
- end
72
-
73
- context 'evaluation context' do
74
- let(:thing) do
75
- @let_evaluation_context = self
76
- 'a thing'
77
- end
78
-
79
- should 'be the test case' do
80
- thing
81
- assert_equal self, @let_evaluation_context
82
- end
83
- end
84
- end
85
- <!-- example -->
86
- Author
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
-
93
- [Michael Grosser](http://grosser.it)<br/>
94
- michael@grosser.it<br/>
95
- License: MIT<br/>
96
- [![Build Status](https://travis-ci.org/grosser/shoulda-let.png)](http://travis-ci.org/grosser/shoulda-let)
@@ -1,11 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "bump"
6
- gem "rake"
7
- gem "test-unit", ">=2.5.1"
8
- gem "appraisal"
9
- gem "shoulda", "~>2.11"
10
-
11
- gemspec :path=>"../"
@@ -1,27 +0,0 @@
1
- PATH
2
- remote: /Users/mgrosser/code/tools/shoulda-let
3
- specs:
4
- shoulda-let (0.0.4)
5
- shoulda
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- appraisal (0.4.1)
11
- bundler
12
- rake
13
- bump (0.3.7)
14
- rake (0.9.2.2)
15
- shoulda (2.11.3)
16
- test-unit (2.5.1)
17
-
18
- PLATFORMS
19
- ruby
20
-
21
- DEPENDENCIES
22
- appraisal
23
- bump
24
- rake
25
- shoulda (~> 2.11)
26
- shoulda-let!
27
- test-unit (>= 2.5.1)
@@ -1,11 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "bump"
6
- gem "rake"
7
- gem "test-unit", ">=2.5.1"
8
- gem "appraisal"
9
- gem "shoulda", "~>3.1"
10
-
11
- gemspec :path=>"../"
@@ -1,37 +0,0 @@
1
- PATH
2
- remote: /Users/mgrosser/code/tools/shoulda-let
3
- specs:
4
- shoulda-let (0.0.4)
5
- shoulda
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (3.2.8)
11
- i18n (~> 0.6)
12
- multi_json (~> 1.0)
13
- appraisal (0.4.1)
14
- bundler
15
- rake
16
- bump (0.3.7)
17
- i18n (0.6.0)
18
- multi_json (1.3.6)
19
- rake (0.9.2.2)
20
- shoulda (3.1.1)
21
- shoulda-context (~> 1.0)
22
- shoulda-matchers (~> 1.2)
23
- shoulda-context (1.0.0)
24
- shoulda-matchers (1.2.0)
25
- activesupport (>= 3.0.0)
26
- test-unit (2.5.1)
27
-
28
- PLATFORMS
29
- ruby
30
-
31
- DEPENDENCIES
32
- appraisal
33
- bump
34
- rake
35
- shoulda (~> 3.1)
36
- shoulda-let!
37
- test-unit (>= 2.5.1)
@@ -1,11 +0,0 @@
1
- name = "shoulda-let"
2
-
3
- Gem::Specification.new name, "0.0.5" do |s|
4
- s.summary = "A simple let for shoulda"
5
- s.authors = ["Michael Grosser"]
6
- s.email = "michael@grosser.it"
7
- s.homepage = "http://github.com/grosser/#{name}"
8
- s.files = `git ls-files`.split("\n")
9
- s.license = "MIT"
10
- s.add_runtime_dependency "shoulda"
11
- end
@@ -1,21 +0,0 @@
1
- require "test/unit"
2
- $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
- require "shoulda/let"
4
-
5
- class ShouldaLetTest < Test::Unit::TestCase
6
- context "Readme" do
7
- example = File.read(File.expand_path("../../Readme.md", __FILE__)).match(/<!-- example -->(.*)<!-- example -->/m)[1]
8
- eval example
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
21
- end