minitest-sugar 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -26
- data/lib/minitest/sugar.rb +4 -4
- data/minitest-sugar.gemspec +2 -2
- data/test/test.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f3fd492c2b5ad26c0d36471023d386105b0e4a6
|
4
|
+
data.tar.gz: f517a42377f89c86c8900f11c8511af9f05a05f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60ba64081f0674a9f3a025af4e977c9b3c96afa915b26b2f929b1daf05398aa4ad988cb0c3a43e003b5830413ab2bb6547a32ad40e2a9796c8d8801d87ada57e
|
7
|
+
data.tar.gz: 948b14571ab3844cc77a84f152e74a5052f2a0c9f9d59b249fbbf95a4b78ac8ca7d5c3c3efa2794770618e6774acca3bb4f5014af72e17cc5dc8879d32a6d48c
|
data/README.md
CHANGED
@@ -1,43 +1,27 @@
|
|
1
|
-
|
1
|
+
minitest-sugar
|
2
|
+
==============
|
2
3
|
|
3
4
|
Sugar for your MiniTest diet.
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'minitest-sugar'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
6
|
+
Installation
|
7
|
+
------------
|
16
8
|
|
17
9
|
$ gem install minitest-sugar
|
18
10
|
|
19
|
-
|
11
|
+
Usage
|
12
|
+
-----
|
20
13
|
|
21
|
-
|
14
|
+
Install this gem and create tests in a more human readable way:
|
22
15
|
|
23
16
|
```
|
24
17
|
require 'minitest/sugar'
|
25
18
|
|
26
|
-
class TruthTest <
|
27
|
-
extend
|
19
|
+
class TruthTest < Minitest::Test
|
20
|
+
extend Minitest::Sugar
|
28
21
|
|
22
|
+
# instead of `def test_assert_the_truth` do:
|
29
23
|
test 'assert the truth' do
|
30
24
|
assert true
|
31
25
|
end
|
32
26
|
end
|
33
27
|
```
|
34
|
-
|
35
|
-
See [rubydoc](http://rubydoc.info/github/frodsan/minitest-sugar/master/frames).
|
36
|
-
|
37
|
-
## Contributing
|
38
|
-
|
39
|
-
1. Fork it
|
40
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
41
|
-
3. Commit your changes (`git commit -am 'Added some feature'`)
|
42
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
43
|
-
5. Create new Pull Request
|
data/lib/minitest/sugar.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
module
|
1
|
+
module Minitest
|
2
2
|
module Sugar
|
3
3
|
# Allow to create tests in a more human readable form.
|
4
4
|
#
|
5
|
-
# class TruthTest <
|
6
|
-
# extend
|
5
|
+
# class TruthTest < Minitest::Test
|
6
|
+
# extend Minitest::Sugar
|
7
7
|
#
|
8
8
|
# test 'assert the truth' do
|
9
9
|
# assert true
|
@@ -11,7 +11,7 @@ module MiniTest
|
|
11
11
|
# end
|
12
12
|
def test name, &block
|
13
13
|
test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
|
14
|
-
defined
|
14
|
+
defined = instance_method(test_name) rescue false
|
15
15
|
raise "#{test_name} is already defined in #{self}" if defined
|
16
16
|
|
17
17
|
if block_given?
|
data/minitest-sugar.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
12
|
gem.name = 'minitest-sugar'
|
13
13
|
gem.require_paths = ['lib']
|
14
|
-
gem.version = '0.0
|
14
|
+
gem.version = '1.0.0'
|
15
15
|
|
16
|
-
gem.add_dependency 'minitest', '>=
|
16
|
+
gem.add_dependency 'minitest', '>= 5.0.0'
|
17
17
|
end
|
data/test/test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-sugar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.0.0
|
27
27
|
description: Sugar for your MiniTest diet
|
28
28
|
email:
|
29
29
|
- lrodriguezsanc@gmail.com
|