minitest-sugar 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f1ff7eac1580a87aced2704c0e008554ef1d111
4
- data.tar.gz: b3715fe5651385dbfc18ecacb67d5a93f2cc3659
3
+ metadata.gz: 1c4b10e8afb9ddd4de2d203139511667aea661ad
4
+ data.tar.gz: 919cc7af65e1c36a18a60d2c78162caa202c93e1
5
5
  SHA512:
6
- metadata.gz: 87d94211efbba0cb9dc319c42589417ea8d962a1c8a782c4febac65a6cf59bb53eb700a19dbb507275ad61b1392ac2628e8fbbd9334b1166ddd949d56b19f404
7
- data.tar.gz: b041b27b34c27ec80632cebd6b072d040c1222079b20b12efa9abd7b0d49e843080675a793a13cead4604183ed5c1684375bed63e2335667b14834ea84dad9d9
6
+ metadata.gz: 78d8f31f73b828a7228613686afb0130d47899edccf51f9c46fac31e33c9d6ea5be99e5018f8a5cf2f80a1a3a636bdc95bd00589ab978ef9a795445c522d5428
7
+ data.tar.gz: 66ec0d14cf5a327490e9f85a7fa85675f1161a13e4a10d1474278c0cc21831ebebf28c7be9ea72d90ae3b2497200a841ed6a32c80eaf57275c467a833f809218
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2012-2015 Francesco Rodríguez and contributors
3
+ Copyright (c) 2012-2016 Francesco Rodríguez and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,29 @@
1
- minitest-sugar
1
+ minitest-sugar [![Build Status](https://gitlab.com/frodsan/minitest-sugar/badges/master/build.svg)](https://gitlab.com/frodsan/minitest-sugar/builds)
2
2
  ==============
3
3
 
4
4
  Useful helpers for Minitest 5+.
5
5
 
6
+ Installation
7
+ ------------
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem "minitest-sugar"
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```
18
+ $ bundle
19
+ ```
20
+
21
+ Or install it yourself as:
22
+
23
+ ```
24
+ $ gem install minitest-sugar
25
+ ```
26
+
6
27
  Usage
7
28
  -----
8
29
 
@@ -28,9 +49,33 @@ class TruthTest < Minitest::Test
28
49
  end
29
50
  ```
30
51
 
31
- Installation
52
+ Contributing
32
53
  ------------
33
54
 
55
+ Fork the project with:
56
+
34
57
  ```
35
- $ gem install minitest-sugar
58
+ $ git clone git@gitlab.com:frodsan/minitest-sugar.git
59
+ ```
60
+
61
+ To install dependencies, use:
62
+
36
63
  ```
64
+ $ bundle install
65
+ ```
66
+
67
+ To run the test suite, do:
68
+
69
+ ```
70
+ $ rake test
71
+ ```
72
+
73
+ For bug reports and pull requests use [GitLab][issues].
74
+
75
+ License
76
+ -------
77
+
78
+ This gem is released under the [MIT License][mit].
79
+
80
+ [mit]: http://www.opensource.org/licenses/MIT
81
+ [issues]: https://gitlab.com/frodsan/minitest-sugar/issues
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Minitest
2
4
  module Sugar
3
5
  # Public: Helper to define a test method using a String.
@@ -14,9 +16,9 @@ module Minitest
14
16
  # end
15
17
  #
16
18
  def test(name, &block)
17
- test_name = sprintf("test_%s", name.gsub(/\s+/, "_"))
19
+ test_name = format("test_%s", name.gsub(/\s+/, "_"))
18
20
 
19
- if (instance_method(test_name) rescue false)
21
+ if method_defined?(test_name)
20
22
  raise "#{ test_name } is already defined in #{ self }"
21
23
  end
22
24
 
@@ -42,7 +44,9 @@ module Minitest
42
44
  #
43
45
  def setup(&block)
44
46
  define_method(:setup) do
45
- super(); instance_exec(&block)
47
+ super()
48
+
49
+ instance_exec(&block)
46
50
  end
47
51
  end
48
52
 
@@ -69,7 +73,9 @@ module Minitest
69
73
  #
70
74
  def teardown(&block)
71
75
  define_method(:teardown) do
72
- instance_exec(&block); super()
76
+ instance_exec(&block)
77
+
78
+ super()
73
79
  end
74
80
  end
75
81
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Minitest
2
4
  module Sugar
3
- VERSION = "2.1.0"
5
+ VERSION = "2.1.1"
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/setup"
2
4
  require "minitest/autorun"
3
5
  require "minitest/pride"
@@ -9,10 +11,10 @@ class MinitestSugarTest < Minitest::Test
9
11
  end
10
12
 
11
13
  test "raises if the name is already taken" do
12
- self.class.test("name") { }
14
+ self.class.test("name") {}
13
15
 
14
16
  assert_raises(RuntimeError) do
15
- self.class.test("name") { }
17
+ self.class.test("name") {}
16
18
  end
17
19
  end
18
20
 
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: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Francesco Rodriguez
7
+ - Francesco Rodríguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -24,8 +24,36 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.0'
27
- description: Enough sugar for your minitest diet
28
- email: frodsan@protonmail.ch
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.39'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.39'
55
+ description: Enough sugar for your Minitest diet
56
+ email: hello@frodsan.com
29
57
  executables: []
30
58
  extensions: []
31
59
  extra_rdoc_files: []
@@ -34,8 +62,8 @@ files:
34
62
  - README.md
35
63
  - lib/minitest/sugar.rb
36
64
  - lib/minitest/sugar/version.rb
37
- - test/all.rb
38
- homepage: https://github.com/frodsan/minitest-sugar
65
+ - test/sugar_test.rb
66
+ homepage: https://gitlab.com/frodsan/minitest-sugar
39
67
  licenses:
40
68
  - MIT
41
69
  metadata: {}
@@ -55,9 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
83
  version: '0'
56
84
  requirements: []
57
85
  rubyforge_project:
58
- rubygems_version: 2.5.0
86
+ rubygems_version: 2.5.1
59
87
  signing_key:
60
88
  specification_version: 4
61
89
  summary: Useful helpers for Minitest 5+
62
90
  test_files:
63
- - test/all.rb
91
+ - test/sugar_test.rb