maxitest 5.3.1 → 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: ea022ff99431e3da778b3cc5ed529f271bbbf64402a2060d76b4e81043a6cb7c
4
- data.tar.gz: 4d56c86c86b3d4d8a08f9f5420af729043047a4ba49b61d7d6e2dad70d576af4
3
+ metadata.gz: a891c42dce4ed70fcab03167ff415758ed02dcbc7c595e0ab726fc4fd2f13c6b
4
+ data.tar.gz: d03e16cbfd8172e4b65896e3984ef593c53d6f168faa32557fc8564ecf11a578
5
5
  SHA512:
6
- metadata.gz: 99de352de107aa9a55d845309a97e4a21e3c100dd46f02bf6b524de4c3fe6c4374a08a2fd0270cac9ed664b85070eaa29d187e4bbcf20adf8178570bd05326d6
7
- data.tar.gz: 529b1e4803a965943525b0438a3633b4e11bb62762f2f16373f9f0fa7ee93db0ef0a3a501a82757f5c99db6488ac9ae3a4b2776a14483a8b34aaf70b343f4020
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.3.1"
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.3.1
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-10 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.20.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.20.0
32
+ version: 5.24.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement