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 CHANGED
@@ -1,3 +1,8 @@
1
1
  rvm:
2
+ - 1.8.7
2
3
  - 1.9.2
3
4
  - 1.9.3
5
+ - rbx
6
+ - rbx-2.0
7
+ - ree
8
+ - jruby
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MiniTest Should [![Build Status](https://secure.travis-ci.org/citrus/minitest_should.png)](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 yet supported but you can use `should "do something"` instead of those `pesky_underscored_test_names`.
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.1.1'
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 save names
82
+ - ensure dynamic methods have safe names
63
83
 
64
84
  **2011/11/8 - v0.1.0**
65
85
  - it exists!
@@ -2,6 +2,8 @@ require "minitest/unit"
2
2
  require "minitest/should/base"
3
3
  require "minitest/should/version"
4
4
 
5
+ alias :context :describe
6
+
5
7
  module MiniTest
6
8
  module Should
7
9
 
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Should
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -20,5 +20,6 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_development_dependency "rake", "> 0"
22
22
  s.add_development_dependency "bundler", "> 0"
23
+ s.add_development_dependency "minitest", "> 2"
23
24
 
24
25
  end
@@ -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
- date: 2011-11-09 00:00:00 Z
14
- dependencies:
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
- prerelease: false
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: "0"
18
+ requirements:
19
+ - - ! '>'
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
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
- requirement: &id002 !ruby/object:Gem::Requirement
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: "0"
40
+ requirements:
41
+ - - ! '>'
42
+ - !ruby/object:Gem::Version
43
+ version: '2'
35
44
  type: :development
36
- version_requirements: *id002
37
- description: Shoulda style syntax for minitest test::unit. Contexts are not yet supported, but you can use `should "do something"` instead of those `pesky_underscored_test_names`. Please see documentation for more information.
38
- email:
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: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
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: "0"
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, but you can use `should "do something"` instead of those `pesky_underscored_test_names`.
85
- test_files:
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