minitest-global_expectations 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/minitest/global_expectations.rb +15 -0
- metadata +11 -12
- data/Rakefile +0 -18
- data/test/minitest_global_expectations_test.rb +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0243b568c53ef9d5577a92e41fe1460cd9286a4fd01f4d4988ddf58701661b52
|
|
4
|
+
data.tar.gz: a71c07b6addf52a3e78dd2215c21105ad7026fac97e806a089c676b6e798d2f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 347736d1aada6cd4e0bd01a55afee21593f0ae9e9304a63daeaac5963db3ebc747156897a559116878761a8a5e9d12305f98fa82186d0a2b50d670363f824a3c
|
|
7
|
+
data.tar.gz: 12b2ac68031b945c1589fa429f26c07c63052032b6e91eef7993cb3693b546e6a12f66a90e237e966918487b8a22224a5a3a01a80891f76e5c4cfd86955bfc66
|
data/CHANGELOG
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
require 'minitest/spec'
|
|
2
2
|
|
|
3
|
+
# :nocov:
|
|
3
4
|
module MinitestGlobalExpectations
|
|
5
|
+
if Minitest::VERSION >= '6'
|
|
6
|
+
# :nocov:
|
|
7
|
+
class ::Minitest::Spec
|
|
8
|
+
def self.current
|
|
9
|
+
Thread.current[:current_spec]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def initialize name # :nodoc:
|
|
13
|
+
super
|
|
14
|
+
Thread.current[:current_spec] = self
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
4
19
|
[
|
|
5
20
|
:must_be_empty,
|
|
6
21
|
:must_equal,
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitest-global_expectations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Evans
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: minitest
|
|
@@ -32,22 +31,23 @@ email: code@jeremyevans.net
|
|
|
32
31
|
executables: []
|
|
33
32
|
extensions: []
|
|
34
33
|
extra_rdoc_files:
|
|
35
|
-
- README.rdoc
|
|
36
34
|
- CHANGELOG
|
|
37
35
|
- MIT-LICENSE
|
|
36
|
+
- README.rdoc
|
|
38
37
|
files:
|
|
39
38
|
- CHANGELOG
|
|
40
39
|
- MIT-LICENSE
|
|
41
40
|
- README.rdoc
|
|
42
|
-
- Rakefile
|
|
43
41
|
- lib/minitest/global_expectations.rb
|
|
44
42
|
- lib/minitest/global_expectations/autorun.rb
|
|
45
|
-
|
|
46
|
-
homepage: http://github.com/jeremyevans/minitest-global_expectations
|
|
43
|
+
homepage: https://github.com/jeremyevans/minitest-global_expectations
|
|
47
44
|
licenses:
|
|
48
45
|
- MIT
|
|
49
|
-
metadata:
|
|
50
|
-
|
|
46
|
+
metadata:
|
|
47
|
+
bug_tracker_uri: https://github.com/jeremyevans/minitest-global_expectations/issues
|
|
48
|
+
changelog_uri: https://github.com/jeremyevans/minitest-global_expectations/blob/master/CHANGELOG
|
|
49
|
+
mailing_list_uri: https://github.com/jeremyevans/minitest-global_expectations/discussions
|
|
50
|
+
source_code_uri: https://github.com/jeremyevans/minitest-global_expectations
|
|
51
51
|
rdoc_options:
|
|
52
52
|
- "--quiet"
|
|
53
53
|
- "--line-numbers"
|
|
@@ -62,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
62
62
|
requirements:
|
|
63
63
|
- - ">="
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: '
|
|
65
|
+
version: '1.8'
|
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - ">="
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: '0'
|
|
71
71
|
requirements: []
|
|
72
|
-
rubygems_version:
|
|
73
|
-
signing_key:
|
|
72
|
+
rubygems_version: 4.0.2
|
|
74
73
|
specification_version: 4
|
|
75
74
|
summary: Support minitest expectation methods for all objects
|
|
76
75
|
test_files: []
|
data/Rakefile
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
require "rake"
|
|
2
|
-
require "rake/clean"
|
|
3
|
-
|
|
4
|
-
CLEAN.include ["minitest-global_expectations-*.gem"]
|
|
5
|
-
|
|
6
|
-
desc "Build minitest-global_expectations gem"
|
|
7
|
-
task :package=>[:clean] do |p|
|
|
8
|
-
sh %{#{FileUtils::RUBY} -S gem build minitest-global_expectations.gemspec}
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
### Specs
|
|
12
|
-
|
|
13
|
-
desc "Run test"
|
|
14
|
-
task :test do
|
|
15
|
-
sh %{#{FileUtils::RUBY} test/minitest_global_expectations_test.rb}
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
task :default=>:test
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
$:.unshift(File.join(File.dirname(File.expand_path(__FILE__)), "../lib/"))
|
|
2
|
-
require 'rubygems'
|
|
3
|
-
ENV['MT_NO_PLUGINS'] = '1' # Work around stupid autoloading of plugins
|
|
4
|
-
gem 'minitest'
|
|
5
|
-
require 'minitest/global_expectations/autorun'
|
|
6
|
-
|
|
7
|
-
describe "minitest-global_expectations" do
|
|
8
|
-
it "should allow calling expectation methods on all objects" do
|
|
9
|
-
[].must_be_empty
|
|
10
|
-
1.must_equal 1
|
|
11
|
-
1.0.must_be_close_to 1.000000001
|
|
12
|
-
1.0.must_be_within_epsilon 1.000000001
|
|
13
|
-
[1].must_include 1
|
|
14
|
-
Object.new.must_be_instance_of Object
|
|
15
|
-
1.must_be_kind_of Numeric
|
|
16
|
-
'a'.must_match(/a/)
|
|
17
|
-
nil.must_be_nil
|
|
18
|
-
1.must_be :==, 1
|
|
19
|
-
proc{print '.'}.must_output('.')
|
|
20
|
-
proc{raise}.must_raise RuntimeError
|
|
21
|
-
1.must_respond_to :abs
|
|
22
|
-
true.must_be_same_as true
|
|
23
|
-
proc{}.must_be_silent
|
|
24
|
-
proc{throw :foo}.must_throw :foo
|
|
25
|
-
[1].wont_be_empty
|
|
26
|
-
1.wont_equal 2
|
|
27
|
-
1.wont_be_close_to 2
|
|
28
|
-
1.wont_be_within_epsilon 2
|
|
29
|
-
[1].wont_include 2
|
|
30
|
-
1.wont_be_instance_of Numeric
|
|
31
|
-
1.wont_be_kind_of Hash
|
|
32
|
-
'a'.wont_match(/b/)
|
|
33
|
-
1.wont_be_nil
|
|
34
|
-
1.wont_be :==, 2
|
|
35
|
-
1.wont_respond_to :foo
|
|
36
|
-
end
|
|
37
|
-
end
|