mute 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +10 -1
- data/lib/mute/io.rb +1 -1
- data/lib/mute/version.rb +1 -1
- data/spec/mute/io_spec.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364116d4a16c989393501ed20235037a0baa5500
|
4
|
+
data.tar.gz: 5424d01051348a08be6987a4a22111226bd31529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c54a9963fec6dbf456a9b743ae120b611a5516cdf1e6b0b6922cd2c75bb3efc6a925c342b947512b499fb59cf1b237ce2eea1c0ce693aa6f6eda224a28f2353
|
7
|
+
data.tar.gz: 6e97bb82faa9a232d4939cf18c6f948f568eaf3c7eaeba14b5eaf3b381dcefa9169d3c88f4f5e5decf16a1efb719a6921cd56c8f78d26008564736062cb4be02
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -42,7 +42,7 @@ puts output
|
|
42
42
|
#=> Oops!
|
43
43
|
```
|
44
44
|
|
45
|
-
|
45
|
+
Use it in your test suite to verify output:
|
46
46
|
|
47
47
|
```ruby
|
48
48
|
require 'mute'
|
@@ -60,6 +60,15 @@ describe MyLogger do
|
|
60
60
|
end
|
61
61
|
```
|
62
62
|
|
63
|
+
Or just mute stdout completely for the whole test suite:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
# spec/spec_helper.rb
|
67
|
+
require 'mute'
|
68
|
+
|
69
|
+
Mute::IO.capture_stdout
|
70
|
+
```
|
71
|
+
|
63
72
|
## Installation
|
64
73
|
|
65
74
|
```bash
|
data/lib/mute/io.rb
CHANGED
data/lib/mute/version.rb
CHANGED
data/spec/mute/io_spec.rb
CHANGED
@@ -43,8 +43,12 @@ describe Mute::IO do
|
|
43
43
|
expect($stdout).to eq original
|
44
44
|
end
|
45
45
|
|
46
|
-
it '
|
47
|
-
expect
|
46
|
+
it 'captures stdout indefinitely when called without a block' do
|
47
|
+
expect($stdout).to_not receive(:puts)
|
48
|
+
|
49
|
+
described_class.capture_stdout
|
50
|
+
|
51
|
+
puts 'hello'
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|