minitest-server 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e060e04835c0ce49ec490ee9a5db0dd1ae8624e
4
- data.tar.gz: 79c01e23b560273cdaf57d1cd19092e275b020df
3
+ metadata.gz: 97e2a1243b605181c638d6bb2f8573671146986c
4
+ data.tar.gz: 5f0051d209693dd5cca103da5507d0721b3636d4
5
5
  SHA512:
6
- metadata.gz: adc29390ec7cb01749c9b4a292095cd27e8f7666716e29c11216f3811a7fe5263f0792e352c4c6d6fd046f19505f06a7a3911dbb0cfa41d9fa5d57b99a5b13b1
7
- data.tar.gz: 5caf5951d2a8af12194d48826101017973effdd909639f6fac238a0a53dc68dc326c9a22cf11538e31fbf8bf32db3d665539e0a82f89beee130d4256843d4374
6
+ metadata.gz: fa7e18d88937623aa6cdb4dcbbce983bf2b3f2a5de9b9c7dbb5f326600ddf38c943a9bd36330ac6298114d3b7ea9f83447f83c88d56ad4c645cb61adac78b870
7
+ data.tar.gz: 74ef751b6d92ba657b0cdffe947315820b9fc456960e0dcc63d8b06778f3576ad9f23ce14adf760f00a51a5921a1639424fad32f51d29dfe3d87367a17d9704a
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,5 @@
1
- ����-��λwx�|%���2ζŊ�+�Y:7ZJW��t�L�f�t8e���`��:�Nkm���� 7�á�woԉ��Nvğ�/B$
1
+ }�>���ۃ��ȡ��oT-n{>u4 jC�L���/2
2
+ �w��
3
+ bR5݀��D��9���
4
+ �����d��]�|��>�Q�59�,XHm�˴x1^�X~�q�ڢ�.���y�ݩGe�S�X6N�`շ՚�c���ƾ���'0Ӌ'��n<E�Rn" 2��/
5
+ t�;g�[��[��n�&y�;�5��
@@ -1,3 +1,10 @@
1
+ === 1.0.4 / 2016-05-02
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Fixes a problem with rails or some evil gem messing up Exception marshalling.
6
+ * Sanitize assertion exceptions because web-console is EVIL.
7
+
1
8
  === 1.0.3 / 2015-07-25
2
9
 
3
10
  * 1 bug fix:
@@ -3,7 +3,7 @@ require "tmpdir"
3
3
  require "minitest"
4
4
 
5
5
  class Minitest::Server
6
- VERSION = "1.0.3"
6
+ VERSION = "1.0.4"
7
7
 
8
8
  TOPDIR = Dir.pwd + "/"
9
9
 
@@ -44,14 +44,24 @@ class Minitest::ServerReporter < Minitest::AbstractReporter
44
44
  # embedded exception might not be able to be marshaled.
45
45
  bt = e.exception.backtrace
46
46
 
47
- ex = RuntimeError.new(e.message)
47
+ ex = RuntimeError.new(e.exception.message)
48
48
  e.exception = ex
49
49
  ex.set_backtrace bt
50
50
 
51
+ e = Minitest::UnexpectedError.new ex # ugh. some rails plugin. ugh.
52
+
51
53
  if ex.instance_variables.include? :@bindings then # web-console is Evil
52
54
  ex.instance_variable_set :@bindings, nil
53
55
  e.instance_variable_set :@bindings, nil
54
56
  end
57
+ when Minitest::Assertion then
58
+ bt = e.backtrace
59
+ e = e.class.new(e.message)
60
+ e.set_backtrace bt
61
+ when Minitest::Skip then
62
+ # do nothing
63
+ else
64
+ warn "Unhandled exception type: #{e.class}\n\n#{e.inspect}"
55
65
  end
56
66
 
57
67
  e
@@ -1,10 +1,105 @@
1
1
  require "minitest/autorun"
2
2
  require "minitest/server"
3
+ require "minitest/server_plugin"
3
4
 
4
- module TestMinitest; end
5
+ require "minitest"
6
+ require "minitest/test"
7
+ require "minitest/server"
8
+ require "minitest/server_plugin"
9
+ require "minitest/autorun"
10
+
11
+ class BogoTests < Minitest::Test
12
+ def pass_test
13
+ assert true
14
+ end
15
+
16
+ def fail_test
17
+ assert false, "fail"
18
+ end
19
+
20
+ def error_test
21
+ raise "error"
22
+ rescue => e
23
+ e.instance_variable_set :@binding, binding
24
+ raise e
25
+ end
26
+
27
+ def wtf_test
28
+ assert false, "wtf"
29
+ rescue Minitest::Assertion => e
30
+ e.instance_variable_set :@proc, proc { 42 }
31
+ raise e
32
+ end
33
+ end
34
+
35
+ class TestServerReporter < Minitest::ServerReporter
36
+ def record o
37
+ super
38
+
39
+ Marshal.dump o
40
+ end
41
+ end
42
+
43
+ class Client
44
+ def run pid, type
45
+ reporter = TestServerReporter.new pid
46
+ reporter.start
47
+
48
+ reporter.record Minitest.run_one_method(BogoTests, "#{type}_test")
49
+ end
50
+ end
51
+
52
+ class Server
53
+ attr_accessor :results
54
+
55
+ def self.run type = nil
56
+ s = self.new
57
+ s.run type
58
+ s.results
59
+ end
60
+
61
+ def run type = nil
62
+ Minitest::Server.run self
63
+
64
+ Client.new.run $$, type
65
+ ensure
66
+ Minitest::Server.stop
67
+ end
68
+
69
+ def minitest_start
70
+ # do nothing
71
+ end
72
+
73
+ def minitest_result(*vals)
74
+ self.results = vals
75
+ end
76
+ end
77
+
78
+ class ServerTest < Minitest::Test
79
+ def test_pass
80
+ assert_run "pass", [], 1
81
+ end
82
+
83
+ def test_fail
84
+ assert_run "fail", ["fail"], 1
85
+ end
86
+
87
+ def test_error
88
+ msg = ["RuntimeError: error\n #{__FILE__}:21:in `error_test'"]
89
+ assert_run "error", msg, 0
90
+ end
91
+
92
+ def test_wtf
93
+ assert_run "wtf", ["wtf"], 1
94
+ end
95
+
96
+ def assert_run type, e, n
97
+ act = Server.run type
98
+ act[-1] = 0 # time
99
+ act[-3].map!(&:message)
100
+
101
+ exp = ["test/minitest/test_server.rb", "BogoTests", "#{type}_test", e, n, 0]
5
102
 
6
- class TestMinitest::TestServer < Minitest::Test
7
- def test_sanity
8
- # flunk "write tests or I will kneecap you"
103
+ assert_equal exp, act
9
104
  end
10
105
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -22,14 +22,14 @@ cert_chain:
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
24
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
26
- FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
27
- hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
28
- zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
29
- xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
30
- VpzF30vNaJK6ZT7xlIsIlwmH
25
+ AQB+Hx8xUgrpZa4P8H8gR8zme5kISwQrG80MbpqJV6/G3/ZicRFhN5sjwu0uHGue
26
+ bd9Cymf6oIRwHVarJux2M32T6bL07Hmi07w2QaPc3MnMKB/D46SRZ2JSSGPFRBTc
27
+ SilobMRoGs/7B15uGFUEnNrCB/ltMqhwwSx1r++UQPfeySHEV9uqu03E5Vb7J37O
28
+ 2Er6PLXHRiYsIycD1LkMi6YnixdITRHmrqJYE2rsjaIfpIehiusVAPHkNf7qbpHq
29
+ qx3h45R1CAsObX0SQDIT+rRbQrtKz1GHIZTOFYvEJjUY1XmRTZupD3CJ8Q7sDqSy
30
+ NLq5jm1fq6Y9Uolu3RJbmycf
31
31
  -----END CERTIFICATE-----
32
- date: 2015-07-25 00:00:00.000000000 Z
32
+ date: 2016-05-03 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest
@@ -65,14 +65,14 @@ dependencies:
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '3.13'
68
+ version: '3.15'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '3.13'
75
+ version: '3.15'
76
76
  description: |-
77
77
  minitest-server provides a client/server setup with your minitest
78
78
  process, allowing your test run to send its results directly to a
@@ -87,7 +87,6 @@ extra_rdoc_files:
87
87
  - README.rdoc
88
88
  files:
89
89
  - .autotest
90
- - .gemtest
91
90
  - History.rdoc
92
91
  - Manifest.txt
93
92
  - README.rdoc
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes