minitest_should 0.1.1 → 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/.travis.yml +5 -0
- data/README.md +24 -4
- data/lib/minitest/should.rb +2 -0
- data/lib/minitest/should/version.rb +1 -1
- data/minitest_should.gemspec +1 -0
- data/test/test_minitest_should.rb +29 -1
- metadata +57 -44
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MiniTest Should [](http://travis-ci.org/citrus/minitest_should)
|
2
2
|
|
3
|
-
minitest_should allows you to write unit tests with [shoulda](https://github.com/thoughtbot/shoulda) style syntax. Contexts are not
|
3
|
+
minitest_should allows you to write unit tests with [shoulda](https://github.com/thoughtbot/shoulda) style syntax. Contexts are not fully supported but you can use `should "do something"` instead of those `pesky_underscored_test_names`.
|
4
4
|
|
5
5
|
|
6
6
|
Usage
|
@@ -19,6 +19,11 @@ Usage
|
|
19
19
|
assert true
|
20
20
|
end
|
21
21
|
|
22
|
+
def test_something_else_should_be_nothing
|
23
|
+
@something = "nothing"
|
24
|
+
assert_equal "nothing", @something
|
25
|
+
end
|
26
|
+
|
22
27
|
end
|
23
28
|
|
24
29
|
# use this!
|
@@ -28,6 +33,18 @@ Usage
|
|
28
33
|
assert true
|
29
34
|
end
|
30
35
|
|
36
|
+
context "Something else" do
|
37
|
+
|
38
|
+
def setup
|
39
|
+
@something = "nothing"
|
40
|
+
end
|
41
|
+
|
42
|
+
should "be nothing" do
|
43
|
+
assert_equal "nothing", @something
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
31
48
|
end
|
32
49
|
|
33
50
|
|
@@ -41,7 +58,7 @@ As usual, just use the `gem install` command:
|
|
41
58
|
|
42
59
|
Or add minitest_should as a gem in your Gemfile:
|
43
60
|
|
44
|
-
gem 'minitest_should', '~> 0.
|
61
|
+
gem 'minitest_should', '~> 0.2.0'
|
45
62
|
|
46
63
|
Then run `bundle install`
|
47
64
|
|
@@ -50,7 +67,7 @@ Then run `bundle install`
|
|
50
67
|
Testing
|
51
68
|
-------
|
52
69
|
|
53
|
-
Testing is done with minitest. Run the tests with:
|
70
|
+
Testing is done with minitest. (duh!) Run the tests with:
|
54
71
|
|
55
72
|
rake
|
56
73
|
|
@@ -58,8 +75,11 @@ Testing is done with minitest. Run the tests with:
|
|
58
75
|
Changelog
|
59
76
|
---------
|
60
77
|
|
78
|
+
**2011/12/8 - v0.2.0**
|
79
|
+
- add contexts
|
80
|
+
|
61
81
|
**2011/11/8 - v0.1.1**
|
62
|
-
- ensure dynamic methods have
|
82
|
+
- ensure dynamic methods have safe names
|
63
83
|
|
64
84
|
**2011/11/8 - v0.1.0**
|
65
85
|
- it exists!
|
data/lib/minitest/should.rb
CHANGED
data/minitest_should.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
gem "minitest"
|
1
2
|
require "minitest/autorun"
|
2
3
|
require "minitest/should"
|
3
|
-
begin; require "turn"; rescue LoadError; end
|
4
4
|
|
5
5
|
class TestMiniTestShould < MiniTest::Unit::TestCase
|
6
6
|
|
@@ -74,5 +74,33 @@ class TestMiniTestShould < MiniTest::Unit::TestCase
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
77
|
+
|
78
|
+
context "one little alias" do
|
79
|
+
|
80
|
+
should "make this true" do
|
81
|
+
assert true
|
82
|
+
end
|
83
|
+
|
84
|
+
context "with a another context" do
|
77
85
|
|
86
|
+
should "just keep on keepin' on" do
|
87
|
+
assert true
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
context "with the same method names as another context" do
|
93
|
+
|
94
|
+
should "just work" do
|
95
|
+
assert true
|
96
|
+
end
|
97
|
+
|
98
|
+
should "just keep on keepin' on" do
|
99
|
+
assert true
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
78
106
|
end
|
metadata
CHANGED
@@ -1,49 +1,58 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest_should
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Spencer Steffen
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-12-08 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rake
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70281328533800 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>'
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
24
22
|
type: :development
|
25
|
-
|
26
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70281328533800
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: bundler
|
27
|
+
requirement: &70281328533200 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>'
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
28
34
|
prerelease: false
|
29
|
-
|
35
|
+
version_requirements: *70281328533200
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: minitest
|
38
|
+
requirement: &70281328532420 !ruby/object:Gem::Requirement
|
30
39
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>'
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2'
|
35
44
|
type: :development
|
36
|
-
|
37
|
-
|
38
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70281328532420
|
47
|
+
description: Shoulda style syntax for minitest test::unit. Contexts are not yet supported,
|
48
|
+
but you can use `should "do something"` instead of those `pesky_underscored_test_names`.
|
49
|
+
Please see documentation for more information.
|
50
|
+
email:
|
39
51
|
- spencer@citrusme.com
|
40
52
|
executables: []
|
41
|
-
|
42
53
|
extensions: []
|
43
|
-
|
44
54
|
extra_rdoc_files: []
|
45
|
-
|
46
|
-
files:
|
55
|
+
files:
|
47
56
|
- .gitignore
|
48
57
|
- .travis.yml
|
49
58
|
- Gemfile
|
@@ -57,30 +66,34 @@ files:
|
|
57
66
|
- test/test_minitest_should.rb
|
58
67
|
homepage: https://github.com/citrus/minitest_should
|
59
68
|
licenses: []
|
60
|
-
|
61
69
|
post_install_message:
|
62
70
|
rdoc_options: []
|
63
|
-
|
64
|
-
require_paths:
|
71
|
+
require_paths:
|
65
72
|
- lib
|
66
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
74
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
-
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
hash: -18762255773632330
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
83
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
hash: -18762255773632330
|
78
91
|
requirements: []
|
79
|
-
|
80
92
|
rubyforge_project: minitest_should
|
81
93
|
rubygems_version: 1.8.10
|
82
94
|
signing_key:
|
83
95
|
specification_version: 3
|
84
|
-
summary: Shoulda style syntax for minitest test::unit. Contexts are not yet supported,
|
85
|
-
|
96
|
+
summary: Shoulda style syntax for minitest test::unit. Contexts are not yet supported,
|
97
|
+
but you can use `should "do something"` instead of those `pesky_underscored_test_names`.
|
98
|
+
test_files:
|
86
99
|
- test/test_minitest_should.rb
|