minitest-bang 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/minitest/bang.rb +16 -26
- data/lib/minitest/dsl.rb +23 -0
- metadata +34 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2E3NmQyNzlhMDlmZWVlOTYyMzllNzMxNTg3OTY5MzM3YzliZTI5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODE2NTNhYmUwYjVlY2E2YjE4NjI0YTE3MWYzOTAwODlkMGE5ZWYxZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTIzMzVjNDU1NWZiYTY4MWExZWJjMzUyMDEwNWVmN2JhNGQxZmMyNGUxNjk4
|
10
|
+
MmU0Y2IxZmQzN2RjY2Y5ZTYwOWU4MzM3MmEwNGYzZGYwYTg2MWU0OGYyMTQz
|
11
|
+
ZTk5OWJiMTEzYjRlYzFjMzMwZjY1MmMwZjU4Njk2YWQzYzg4ZTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODc4ZjBjOGE5YjEwYWFlYjE1NDYwOTQxMWM1OWJhMjIxMTAwZWU0OTRkZGEw
|
14
|
+
OGMzOTYwMTk1OGY2YTQ4MDYwY2I3M2ZkNGEyY2QxMzM5NWRhYmMyZmUxMDRi
|
15
|
+
YmQyOWUwYjczNjI5NjdmYmMyZmExN2I1NzhmYjEyYTIwM2Y5MTU=
|
data/lib/minitest/bang.rb
CHANGED
@@ -1,35 +1,25 @@
|
|
1
|
-
require 'set'
|
2
1
|
require 'minitest/spec'
|
2
|
+
require_relative 'dsl'
|
3
3
|
|
4
|
-
module Minitest
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
let(name, &block)
|
13
|
-
bangs << name
|
4
|
+
module Minitest
|
5
|
+
module Bang
|
6
|
+
def before_setup
|
7
|
+
super
|
8
|
+
self.class.bangs.each do |bang|
|
9
|
+
send(bang)
|
10
|
+
end
|
11
|
+
end
|
14
12
|
end
|
15
|
-
end
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
self.class.bangs.each do |bang|
|
21
|
-
send(bang)
|
14
|
+
if defined?(Unit::TestCase)
|
15
|
+
class Unit::TestCase
|
16
|
+
include Bang
|
22
17
|
end
|
23
18
|
end
|
24
|
-
end
|
25
19
|
|
26
|
-
if defined?(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
if defined?(MiniTest::Unit::TestCase)
|
32
|
-
class MiniTest::Unit::TestCase
|
33
|
-
include Bang
|
20
|
+
if defined?(Test)
|
21
|
+
class Test
|
22
|
+
include Bang
|
23
|
+
end
|
34
24
|
end
|
35
25
|
end
|
data/lib/minitest/dsl.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'set'
|
2
|
+
require 'minitest/spec'
|
3
|
+
|
4
|
+
module Minitest
|
5
|
+
module Spec::DSL
|
6
|
+
def bangs
|
7
|
+
@bangs ||= Set.new
|
8
|
+
@bangs = @bangs + bangs_from_parent_scope
|
9
|
+
end
|
10
|
+
|
11
|
+
def let!(name, &block)
|
12
|
+
let(name, &block)
|
13
|
+
bangs << name
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def bangs_from_parent_scope
|
19
|
+
return Set.new unless defined? self.superclass.bangs
|
20
|
+
self.superclass.bangs
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-bang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Stevens
|
@@ -10,8 +10,36 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ! '>='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: coveralls
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
15
43
|
- !ruby/object:Gem::Dependency
|
16
44
|
name: minitest
|
17
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -21,7 +49,7 @@ dependencies:
|
|
21
49
|
version: 4.7.5
|
22
50
|
- - <=
|
23
51
|
- !ruby/object:Gem::Version
|
24
|
-
version: 5.4.
|
52
|
+
version: 5.4.3
|
25
53
|
type: :runtime
|
26
54
|
prerelease: false
|
27
55
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +59,7 @@ dependencies:
|
|
31
59
|
version: 4.7.5
|
32
60
|
- - <=
|
33
61
|
- !ruby/object:Gem::Version
|
34
|
-
version: 5.4.
|
62
|
+
version: 5.4.3
|
35
63
|
description: Lets you use let! to immediately execute lets in minitest spec.
|
36
64
|
email: kstevens715@gmail.com
|
37
65
|
executables: []
|
@@ -39,6 +67,7 @@ extensions: []
|
|
39
67
|
extra_rdoc_files: []
|
40
68
|
files:
|
41
69
|
- lib/minitest/bang.rb
|
70
|
+
- lib/minitest/dsl.rb
|
42
71
|
homepage: https://github.com/kstevens715/minitest-bang
|
43
72
|
licenses:
|
44
73
|
- MIT
|
@@ -59,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
88
|
version: '0'
|
60
89
|
requirements: []
|
61
90
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.4.4
|
63
92
|
signing_key:
|
64
93
|
specification_version: 4
|
65
94
|
summary: Provides let! for minitest spec, much like RSpec's.
|