minitest-sugar 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gems +1 -0
- data/.gitignore +0 -16
- data/README.md +4 -6
- data/UNLICENSE +24 -0
- data/lib/minitest/sugar.rb +6 -6
- data/minitest-sugar.gemspec +11 -14
- data/test/sugar.rb +17 -0
- metadata +17 -18
- data/Gemfile +0 -3
- data/LICENSE +0 -22
- data/Rakefile +0 -2
- data/test/test.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24fd278b77acd09b7711231beede0dfef85c5e55
|
4
|
+
data.tar.gz: 2b577f8eccfe77cad17bfdb5b66cf72e0e2f98fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742eb57d1640c93252cc8b05b93ab89ae069939d8f6a494cbfb417f0fc47658ad999abeb6d8505741c35998a5fa438dfc6dd87e7cb7766389644d7c70dc441a3
|
7
|
+
data.tar.gz: adc277915c7d430a0bec7e24a12d2be90e4024091dc0b3a51af27715fa2b1493e8c50018fdb7593df9dbab9d3d9492833a1adbc09183f44e8f627862ef9e793d
|
data/.gems
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
minitest -v 5.2.1
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
minitest-sugar
|
2
2
|
==============
|
3
3
|
|
4
|
-
|
4
|
+
Creates tests in a more human readable way.
|
5
5
|
|
6
6
|
Installation
|
7
7
|
------------
|
@@ -11,16 +11,14 @@ Installation
|
|
11
11
|
Usage
|
12
12
|
-----
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
```
|
17
|
-
require 'minitest/sugar'
|
14
|
+
```ruby
|
15
|
+
require "minitest/sugar"
|
18
16
|
|
19
17
|
class TruthTest < Minitest::Test
|
20
18
|
extend Minitest::Sugar
|
21
19
|
|
22
20
|
# instead of `def test_assert_the_truth` do:
|
23
|
-
test
|
21
|
+
test "assert the truth" do
|
24
22
|
assert true
|
25
23
|
end
|
26
24
|
end
|
data/UNLICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
2
|
+
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4
|
+
distribute this software, either in source code form or as a compiled
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
6
|
+
means.
|
7
|
+
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
9
|
+
of this software dedicate any and all copyright interest in the
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
11
|
+
of the public at large and to the detriment of our heirs and
|
12
|
+
successors. We intend this dedication to be an overt act of
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
14
|
+
software under copyright law.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
data/lib/minitest/sugar.rb
CHANGED
@@ -5,20 +5,20 @@ module Minitest
|
|
5
5
|
# class TruthTest < Minitest::Test
|
6
6
|
# extend Minitest::Sugar
|
7
7
|
#
|
8
|
-
# test
|
8
|
+
# test "assert the truth" do
|
9
9
|
# assert true
|
10
10
|
# end
|
11
11
|
# end
|
12
|
-
def test
|
13
|
-
test_name = "test_#{name.gsub(/\s+/,
|
12
|
+
def test(name, &block)
|
13
|
+
test_name = "test_#{name.gsub(/\s+/,"_")}"
|
14
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?
|
18
|
-
define_method
|
18
|
+
define_method(test_name, &block)
|
19
19
|
else
|
20
|
-
define_method
|
21
|
-
flunk
|
20
|
+
define_method(test_name) do
|
21
|
+
flunk("No implementation provided for #{name}")
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/minitest-sugar.gemspec
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "minitest-sugar"
|
3
|
+
s.version = "1.0.1"
|
4
|
+
s.summary = "Enough sugar for your minitest diet."
|
5
|
+
s.description = s.summary
|
6
|
+
s.authors = ["Francesco Rodriguez"]
|
7
|
+
s.email = ["frodsan@me.com"]
|
8
|
+
s.homepage = "https://github.com/frodsan/minitest-sugar"
|
9
|
+
s.license = "Unlicense"
|
2
10
|
|
3
|
-
|
4
|
-
gem.authors = ['Francesco Rodriguez']
|
5
|
-
gem.email = ['lrodriguezsanc@gmail.com']
|
6
|
-
gem.description = %q{Sugar for your MiniTest diet}
|
7
|
-
gem.summary = %q{Sugar for your MiniTest diet}
|
8
|
-
gem.homepage = 'https://github.com/frodsan/minitest-sugar'
|
11
|
+
s.files = `git ls-files`.split("\n")
|
9
12
|
|
10
|
-
|
11
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
|
-
gem.name = 'minitest-sugar'
|
13
|
-
gem.require_paths = ['lib']
|
14
|
-
gem.version = '1.0.0'
|
15
|
-
|
16
|
-
gem.add_dependency 'minitest', '>= 5.0.0'
|
13
|
+
s.add_dependency "minitest", ">= 5.0.0"
|
17
14
|
end
|
data/test/sugar.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
gem "minitest", ">= 5.0.0"
|
2
|
+
require "minitest/autorun"
|
3
|
+
require_relative "../lib/minitest/sugar"
|
4
|
+
|
5
|
+
class MinitestSugarTest < Minitest::Test
|
6
|
+
extend Minitest::Sugar
|
7
|
+
|
8
|
+
test "defines a friendly human description" do
|
9
|
+
assert true
|
10
|
+
end
|
11
|
+
|
12
|
+
test "raises if the name is already taken" do
|
13
|
+
self.class.test("name") {}
|
14
|
+
|
15
|
+
assert_raises(RuntimeError) { self.class.test("name") {} }
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,46 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-sugar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
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
26
|
version: 5.0.0
|
27
|
-
description:
|
27
|
+
description: Enough sugar for your minitest diet.
|
28
28
|
email:
|
29
|
-
-
|
29
|
+
- frodsan@me.com
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- .
|
35
|
-
-
|
36
|
-
- LICENSE
|
34
|
+
- ".gems"
|
35
|
+
- ".gitignore"
|
37
36
|
- README.md
|
38
|
-
-
|
37
|
+
- UNLICENSE
|
39
38
|
- lib/minitest/sugar.rb
|
40
39
|
- minitest-sugar.gemspec
|
41
|
-
- test/
|
40
|
+
- test/sugar.rb
|
42
41
|
homepage: https://github.com/frodsan/minitest-sugar
|
43
|
-
licenses:
|
42
|
+
licenses:
|
43
|
+
- Unlicense
|
44
44
|
metadata: {}
|
45
45
|
post_install_message:
|
46
46
|
rdoc_options: []
|
@@ -48,19 +48,18 @@ require_paths:
|
|
48
48
|
- lib
|
49
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.0
|
61
|
+
rubygems_version: 2.2.0
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
|
-
summary:
|
65
|
-
test_files:
|
66
|
-
- test/test.rb
|
64
|
+
summary: Enough sugar for your minitest diet.
|
65
|
+
test_files: []
|
data/Gemfile
DELETED
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 Francesco Rodriguez
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED