minitest-context 0.1.0 → 0.2.0

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/.yardopts CHANGED
@@ -2,8 +2,8 @@
2
2
  -M redcarpet
3
3
  -m markdown
4
4
  --hide-void-return
5
- --main README.txt
5
+ --main README.md
6
6
  -
7
- README.txt
7
+ README.md
8
8
  LICENSE.txt
9
9
 
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ __OVERVIEW__
2
+
3
+
4
+ | Project | minitest-context
5
+ |:----------------|:--------------------------------------------------
6
+ | Author | Rob Gleeson
7
+ | Homepage | https://github.com/robgleeson/minitest-context
8
+ | Documentation | http://rubydoc.info/gems/minitest-context/frames
9
+
10
+
11
+ __DESCRIPTION__
12
+
13
+ minitest/context can define contexts for code reuse in MiniTest specs that share common expectations.
14
+ The idea orginated from the `shared_context()` and `include_context()` methods distributed with RSpec.
15
+
16
+ MiniTest supports code re-use in MiniTest specs already, via a subclass of MiniTest::Spec.
17
+ You might want to look at that option, if you didn't know about it already.
18
+
19
+ __EXAMPLES__
20
+
21
+ MiniTest::Context.define(:operand) do
22
+ before do
23
+ @operand = 40
24
+ end
25
+ end
26
+
27
+ describe "Addition operator" do
28
+ inherit_context :operand
29
+
30
+ it "should perform addition on the operand." do
31
+ @operand = @operand + 10
32
+ @operand.must_equal(50)
33
+ end
34
+ end
35
+
36
+ describe "Subtraction operator" do
37
+ inherit_context :operand
38
+
39
+ it "should perform subtraction on the operand." do
40
+ @operand = @operand - 10
41
+ @operand.must_equal(30)
42
+ end
43
+ end
44
+
45
+ __INSTALL__
46
+
47
+ gem install minitest-context
48
+
49
+ __LICENSE__
50
+
51
+
52
+ See LICENSE.txt
53
+
54
+
data/Rakefile CHANGED
@@ -1,7 +1,17 @@
1
+ $LOAD_PATH.unshift *%w(./lib ./spec)
2
+ require 'minitest/context/version'
3
+
1
4
  desc "Run tests."
2
5
  task :test do
3
- $LOAD_PATH.unshift *%w(./lib ./spec)
4
6
  Dir["./spec/*_spec.rb"].each { |f| require(f) }
5
7
  end
6
8
 
9
+ namespace :gem do
10
+ desc "Release a new version"
11
+ task :release do
12
+ `gem build minitest-context.gemspec`
13
+ `gem push minitest-context-#{MiniTest::Context::VERSION}.gem`
14
+ end
15
+ end
16
+
7
17
  task :default => :test
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Context
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,70 +1,51 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: minitest-context
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 0
10
- version: 0.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - robgleeson
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-09-15 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-19 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: minitest
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70126913223860 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 9
30
- segments:
31
- - 2
32
- - 5
33
- version: "2.5"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.5'
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rake
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70126913223860
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &70126913222860 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
29
+ requirements:
42
30
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 63
45
- segments:
46
- - 0
47
- - 9
48
- - 2
31
+ - !ruby/object:Gem::Version
49
32
  version: 0.9.2
50
33
  type: :development
51
- version_requirements: *id002
34
+ prerelease: false
35
+ version_requirements: *70126913222860
52
36
  description: Defines contexts for code reuse in MiniTest specs that share common expectations.
53
- email:
37
+ email:
54
38
  - rob@flowof.info
55
39
  executables: []
56
-
57
40
  extensions: []
58
-
59
41
  extra_rdoc_files: []
60
-
61
- files:
42
+ files:
62
43
  - .gitignore
63
44
  - .travis.yml
64
45
  - .yardopts
65
46
  - Gemfile
66
47
  - LICENSE.txt
67
- - README.txt
48
+ - README.md
68
49
  - Rakefile
69
50
  - lib/minitest/context.rb
70
51
  - lib/minitest/context/version.rb
@@ -74,41 +55,37 @@ files:
74
55
  - spec/contexts/stacked_context.rb
75
56
  - spec/minitest_context_spec.rb
76
57
  - spec/spec_helper.rb
77
- has_rdoc: true
78
58
  homepage: https://github.com/robgleeson/minitest-context
79
59
  licenses: []
80
-
81
60
  post_install_message:
82
61
  rdoc_options: []
83
-
84
- require_paths:
62
+ require_paths:
85
63
  - lib
86
- required_ruby_version: !ruby/object:Gem::Requirement
64
+ required_ruby_version: !ruby/object:Gem::Requirement
87
65
  none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ segments:
93
71
  - 0
94
- version: "0"
95
- required_rubygems_version: !ruby/object:Gem::Requirement
72
+ hash: -4595800343370108559
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
74
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ segments:
102
80
  - 0
103
- version: "0"
81
+ hash: -4595800343370108559
104
82
  requirements: []
105
-
106
83
  rubyforge_project:
107
- rubygems_version: 1.6.2
84
+ rubygems_version: 1.8.10
108
85
  signing_key:
109
86
  specification_version: 3
110
87
  summary: Defines contexts for code reuse in MiniTest specs that share common expectations.
111
- test_files:
88
+ test_files:
112
89
  - spec/contexts/before_block_context.rb
113
90
  - spec/contexts/stacked_context.rb
114
91
  - spec/minitest_context_spec.rb
data/README.txt DELETED
@@ -1,50 +0,0 @@
1
- = minitest/context
2
-
3
- * Author : Rob Gleeson <rob@flowof.info>
4
- * Home : https://github.com/robgleeson/minitest-context
5
- * API : http://rubydoc.info/github/robgleeson/minitest-context/master/frames
6
- * CI status : http://travis-ci.org/#!/robgleeson/minitest-context
7
-
8
- == Description
9
-
10
- minitest/context can define contexts for code reuse in MiniTest specs that share common expectations.
11
- The idea orginated from the shared_context() and include_context() methods distributed with RSpec.
12
-
13
- MiniTest supports code re-use in MiniTest specs already, via a subclass of MiniTest::Spec.
14
- You might want to look at that option, if you didn't know about it already.
15
-
16
- == Examples
17
-
18
- MiniTest::Context.define(:operand) do
19
- before do
20
- @operand = 40
21
- end
22
- end
23
-
24
- describe "Addition operator" do
25
- inherit_context :operand
26
-
27
- it "should perform addition on the operand." do
28
- @operand = @operand + 10
29
- @operand.must_equal(50)
30
- end
31
- end
32
-
33
- describe "Subtraction operator" do
34
- inherit_context :operand
35
-
36
- it "should perform subtraction on the operand." do
37
- @operand = @operand - 10
38
- @operand.must_equal(30)
39
- end
40
- end
41
-
42
- == Install
43
-
44
- gem install minitest-context
45
-
46
- == License
47
-
48
- See LICENSE.txt
49
-
50
-