maxitest 5.4.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -1
  3. data/lib/maxitest/version.rb +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8fd3bdb0ea91cbd35139f40762c66dca48b9724a00864e5346bf2daa812d39f
4
- data.tar.gz: 992292f1c9d94f418e378bbff6ecb2bff96962c17614bb7ee9de126dcc9358ce
3
+ metadata.gz: a891c42dce4ed70fcab03167ff415758ed02dcbc7c595e0ab726fc4fd2f13c6b
4
+ data.tar.gz: d03e16cbfd8172e4b65896e3984ef593c53d6f168faa32557fc8564ecf11a578
5
5
  SHA512:
6
- metadata.gz: a7007088b08441845f5185452446e023c4531e894298772a4cccfd98d02f925aa3f9a004c6eb570838c0adc09ad730086d0bc0517134dcf5433ddc5991fa0592
7
- data.tar.gz: 9efeabbc06c0061cdd429c68ae2f9835b7eca9a5f9c464982dbe25b789193b5a40b3adc1f93fdd07ef92aa0cc252725bb55cb63728de75378eed1c0e800e1305
6
+ metadata.gz: b4a3861f0a84dc86c421e6f65e5ac6ffdcd85fc72166174ac9968820183cc5877cb45e8d9387c2718feffc3c15cc67e1059e32f1e6d81a0b41008a413e0ec6fe
7
+ data.tar.gz: 304f81afa0c4708a407e51aee4cbb56face81f054e1d2ba51ede7d6b9b359b3a1ecc5c0e3f060c3bea2437a33ff31beab94d3b8eb24b64e0b28ffdce1272cbdc
data/README.md CHANGED
@@ -41,7 +41,14 @@ Usage
41
41
  ```Ruby
42
42
  require "maxitest/autorun"
43
43
 
44
- ... normal tests ...
44
+ # ... normal minitest tests ...
45
+ describe MyClass do
46
+ describe "#my_method" do
47
+ it "passes" do
48
+ _(MyClass.new.my_method).must_equal 1
49
+ end
50
+ end
51
+ end
45
52
  ```
46
53
 
47
54
  ### pending
@@ -49,6 +56,31 @@ require "maxitest/autorun"
49
56
  - `pending "need to fix" do` to show why something is pending
50
57
  - `pending "need to fix", if: ENV["CI"] do` to only skip on CI (if something is supposed to work locally)
51
58
 
59
+ ### with_env
60
+
61
+ Use during test: `with_env FOO: "bar do ...`
62
+ Use as `around` block: `with_env FOO: "bar"`
63
+
64
+ ### context
65
+
66
+ Use as alias for `describe`
67
+
68
+ ```ruby
69
+ describe "#my_method" do
70
+ context "with bad state" do
71
+ before { errors += 1 }
72
+ it "fails" # ...
73
+ end
74
+ end
75
+ ```
76
+
77
+ ### capture_stdout / capture_stderr
78
+
79
+ ```ruby
80
+ output = capture_stdout { puts 1 }
81
+ _(output).must_equal "1\n"
82
+ ```
83
+
52
84
  Development
53
85
  ===========
54
86
  - everything vendored into 1 gem to avoid dependency madness
@@ -1,3 +1,3 @@
1
1
  module Maxitest
2
- VERSION = "5.4.0"
2
+ VERSION = "5.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-27 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 5.14.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 5.21.0
22
+ version: 5.24.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 5.14.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 5.21.0
32
+ version: 5.24.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement