minitest-bang 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/minitest/bang.rb +34 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NDE5MGYwOWZiMWI4YmE0ODdmYmIxNzI4NDA3M2Q4YWY5ZDc1NDFkNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YWRiNmJmZDYzNzI4ZThlNGI1MDdlMzI3YzJmOGE0NzFhMWFlYjljMA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MTNkNGFiYmFmNWE4YmY3NzI1OWIwZjJjZmZhYTc2OThmZWI4NDNlNTllMjRk
|
10
|
+
NTc4NjkwYzY0OTFiYzJhZmE2ODVlNDY0NmRlYWEwYWU3OWMxM2ViMzdlNmYy
|
11
|
+
MzJlMDljMWNkZDZhYzMzN2IxMjE3OTA2NmZiMjY3MjA3MjVjMjM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjM3MmQ1N2Y1NjMwY2JlNDBiOWQ0MGY0NTNkM2Q4ZDZkODU1NjhhNzRjNTNk
|
14
|
+
ZWRmZjU0NmQxMGRmMDJlMmNmN2U2ZjA1YTI2OWZjZjI3ZjJhNmVlMDFlYWM3
|
15
|
+
MGUxMjZhZmFiYjYyZWQ0YzNhYWRjZTBjOGZlNGE5NWMwYjE1YTM=
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
module Minitest::Spec::DSL
|
4
|
+
def bangs
|
5
|
+
@bangs ||= Set.new
|
6
|
+
@bangs = @bangs + self.superclass.bangs if defined? self.superclass.bangs
|
7
|
+
@bangs
|
8
|
+
end
|
9
|
+
|
10
|
+
def let!(name, &block)
|
11
|
+
let(name, &block)
|
12
|
+
bangs << name
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
module LetBang
|
17
|
+
def before_setup
|
18
|
+
super
|
19
|
+
self.class.bangs.each do |bang|
|
20
|
+
send(bang)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
if defined?(MiniTest::Test)
|
26
|
+
class MiniTest::Test
|
27
|
+
include LetBang
|
28
|
+
end
|
29
|
+
end
|
30
|
+
if defined?(MiniTest::Unit::TestCase)
|
31
|
+
class MiniTest::Unit::TestCase
|
32
|
+
include LetBang
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: minitest-bang
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kyle Stevens
|
8
|
+
- Ben Kanouse
|
9
|
+
- Rob Jones
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: minitest
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 4.7.5
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 5.4.0
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 4.7.5
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 5.4.0
|
35
|
+
description: Lets you use let! to immediately execute lets in minitest spec.
|
36
|
+
email: kstevens715@gmail.com
|
37
|
+
executables: []
|
38
|
+
extensions: []
|
39
|
+
extra_rdoc_files: []
|
40
|
+
files:
|
41
|
+
- lib/minitest/bang.rb
|
42
|
+
homepage: https://github.com/kstevens715/minitest-bang
|
43
|
+
licenses:
|
44
|
+
- MIT
|
45
|
+
metadata: {}
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 2.2.2
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Provides let! for minitest spec, much like RSpec's.
|
66
|
+
test_files: []
|