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 +4 -4
- data/lib/maxitest/implicit_subject.rb +13 -0
- data/lib/maxitest/vendor/line.rb +1 -1
- data/lib/maxitest/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3211b6b7a1c6213a5af9de6db125e4a50c2d50a0
|
4
|
+
data.tar.gz: 6fe5502ec58d0a1812487a4148274aad471e43fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/maxitest/vendor/line.rb
CHANGED
@@ -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 = "
|
93
|
+
output = "mtest #{file}:#{line}"
|
94
94
|
output = "\e[31m#{output}\e[0m" if $stdout.tty?
|
95
95
|
io.puts output
|
96
96
|
end
|
data/lib/maxitest/version.rb
CHANGED
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.
|
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
|