test-cmd.rb 2.7.0 → 2.7.1
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/lib/test/command/version.rb +1 -1
- data/lib/test/command.rb +1 -0
- data/test/cmd_test.rb +22 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79bec627803ce82d85c99a7f55f00b007cdfba9ecf54634b8c48e9fa64083b17
|
|
4
|
+
data.tar.gz: 73ab470f82fc83f120ab84c5a4345ce6da2c417edf121e24db314ba2cd9b1dad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9d84416530c7becb5915bca84d2bc7eb17532d0bbb53756d205ab2ba06c6f63999ad395ca206e6a943d6f24fc2ce3913b0db7061164bab018499021a3705e20
|
|
7
|
+
data.tar.gz: 6aedc2200539e08f31eebd9d480cbb3c7a4ee0096e477d153a969096df542e79e5b3ac236ebabce6c476bba9f3fce2c3b5210c97e5378d9dd50a3e6fbc406d9c
|
data/lib/test/command/version.rb
CHANGED
data/lib/test/command.rb
CHANGED
data/test/cmd_test.rb
CHANGED
|
@@ -239,5 +239,27 @@ class Test::Command
|
|
|
239
239
|
assert_equal true, ::Test::Command.new("/a/path/that/is/not/found").command_not_found?
|
|
240
240
|
assert_equal true, ::Test::Command.new("/a/path/that/is/not/found").not_found?
|
|
241
241
|
end
|
|
242
|
+
|
|
243
|
+
def test_spawn_returns_self_when_not_found
|
|
244
|
+
command = ::Test::Command.new("/a/path/that/is/not/found")
|
|
245
|
+
assert_equal command, command.spawn
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
def test_spawn_sets_not_found_on_self
|
|
249
|
+
command = ::Test::Command.new("/a/path/that/is/not/found")
|
|
250
|
+
command.spawn
|
|
251
|
+
assert_equal true, command.not_found?
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
def test_stdout_when_not_found
|
|
255
|
+
command = ::Test::Command.new("/a/path/that/is/not/found")
|
|
256
|
+
assert_equal "", command.stdout
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def test_stderr_when_not_found
|
|
260
|
+
command = ::Test::Command.new("/a/path/that/is/not/found")
|
|
261
|
+
assert_equal "No such file or directory - /a/path/that/is/not/found",
|
|
262
|
+
command.stderr
|
|
263
|
+
end
|
|
242
264
|
end
|
|
243
265
|
end
|