maxitest 0.0.3 → 0.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: e88e07ffff07260c223b89fdba1251b4b05cf51c
4
- data.tar.gz: fdf85fa57d59a5360311e4bc588c7d597e8fce87
3
+ metadata.gz: 3211b6b7a1c6213a5af9de6db125e4a50c2d50a0
4
+ data.tar.gz: 6fe5502ec58d0a1812487a4148274aad471e43fa
5
5
  SHA512:
6
- metadata.gz: 5bb533b5f05c111017a5e440691090709e32888cccc28accb397f246613c208a40b9e57c5caad46909b89768bb62a4b20f25290be24cbf141dcf605d60ad3ad5
7
- data.tar.gz: 2a1d22b4010d8a59491b4d99567361d80b04fb0c8f305ec918c32a54aaa4445a067fa6bc54d7228ff4fccc0525e6cfa3316b3cca31cca57794ab497c8fbce5df
6
+ metadata.gz: 9e727a2b1d819113115f46dd5df390cd83c47963393f6e2af89580fcea0309fda0564289bf626cde4e3757b550445e7c21c4dbee51867ca12abbec50d69f5523
7
+ data.tar.gz: 82747c5415fdafebcb10479f42a04cebb6177ad526e7574d55db5e122f8f4486799d0f5612e582c83004179b602f8a5897d3378acfe6dc4da41f2cca2b2f472b
@@ -0,0 +1,13 @@
1
+ # this is a bit hacky / overwrites describe, so not included by default ...
2
+ module Maxitest
3
+ module ImplicitSubject
4
+ def describe(*args, &block)
5
+ super(*args) do
6
+ let(:subject) { args.first.new } if args.first.is_a?(Class)
7
+ instance_exec(&block)
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ Object.include Maxitest::ImplicitSubject # Minitest hacks Kernel -> we need to use alias method or go into Object
@@ -90,7 +90,7 @@ module Minitest
90
90
  if file
91
91
  file = Pathname.new(file)
92
92
  file = file.relative_path_from(pwd) if file.absolute?
93
- output = "ruby #{file} -l #{line}"
93
+ output = "mtest #{file}:#{line}"
94
94
  output = "\e[31m#{output}\e[0m" if $stdout.tty?
95
95
  io.puts output
96
96
  end
@@ -1,3 +1,3 @@
1
1
  module Maxitest
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -97,6 +97,7 @@ files:
97
97
  - bin/mtest
98
98
  - lib/maxitest.rb
99
99
  - lib/maxitest/autorun.rb
100
+ - lib/maxitest/implicit_subject.rb
100
101
  - lib/maxitest/let_bang.rb
101
102
  - lib/maxitest/trap.rb
102
103
  - lib/maxitest/vendor/around.rb