minitest-stub-const 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +40 -0
- metadata +11 -10
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c4b44227e6a2d3c83c746ca1256d92382c5a03db
|
4
|
+
data.tar.gz: 4c8ca8bc13c4997dfd1828f561600a32c7de9fd4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4d5148bca6ed0c248f5da53a7687c7f959381f50d10194c518e048213c29b5b7da16d9940f117be6162b04ce0026329eab929a99e277f2c52e9dd9a2c9fba669
|
7
|
+
data.tar.gz: e9aae1c6672af0e72709731b59eacc51366ea8fafc4297b77cbcec005627b2955558bea9365ce641fa70173e2b0a7a809afdc17c39d144d41a9956f8fa21aebc
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Adam Mckaig
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# minitest-stub-const
|
2
|
+
|
3
|
+
Stub constants for the duration of a block in MiniTest.
|
4
|
+
Like RSpec's [stub_const] [rspec], but boring and non-magical.
|
5
|
+
|
6
|
+
|
7
|
+
## Example
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
it "calls a Thing.add when add_thing is called" do
|
11
|
+
m = MiniTest::Mock.new
|
12
|
+
m.expect(:add, nil)
|
13
|
+
|
14
|
+
MyLib.stub_const(:Thing, m) do
|
15
|
+
@subject.add_thing
|
16
|
+
end
|
17
|
+
|
18
|
+
m.verify
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
|
25
|
+
```sh
|
26
|
+
gem install minitest-stub-const # duh
|
27
|
+
```
|
28
|
+
|
29
|
+
|
30
|
+
## License
|
31
|
+
|
32
|
+
[minitest-stub-const] [repo] is free software, available under [the MIT license]
|
33
|
+
[license].
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
[repo]: https://raw.github.com/adammck/minitest-stub-const
|
39
|
+
[license]: https://raw.github.com/adammck/minitest-stub-const/master/LICENSE
|
40
|
+
[rspec]: https://www.relishapp.com/rspec/rspec-mocks/v/2-12/docs/mutating-constants
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-stub-const
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.2'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Adam Mckaig
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description:
|
15
14
|
email:
|
@@ -19,30 +18,32 @@ extensions: []
|
|
19
18
|
extra_rdoc_files: []
|
20
19
|
files:
|
21
20
|
- lib/minitest/stub_const.rb
|
21
|
+
- LICENSE
|
22
|
+
- README.md
|
22
23
|
- test/test_stub_const.rb
|
23
24
|
homepage: https://github.com/adammck/minitest-stub-const
|
24
|
-
licenses:
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
25
28
|
post_install_message:
|
26
29
|
rdoc_options: []
|
27
30
|
require_paths:
|
28
31
|
- lib
|
29
32
|
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
-
none: false
|
31
33
|
requirements:
|
32
|
-
- -
|
34
|
+
- - '>='
|
33
35
|
- !ruby/object:Gem::Version
|
34
36
|
version: '0'
|
35
37
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
38
|
requirements:
|
38
|
-
- -
|
39
|
+
- - '>='
|
39
40
|
- !ruby/object:Gem::Version
|
40
41
|
version: '0'
|
41
42
|
requirements: []
|
42
43
|
rubyforge_project:
|
43
|
-
rubygems_version:
|
44
|
+
rubygems_version: 2.0.14
|
44
45
|
signing_key:
|
45
|
-
specification_version:
|
46
|
+
specification_version: 4
|
46
47
|
summary: Stub constants for the duration of a block in MiniTest
|
47
48
|
test_files:
|
48
49
|
- test/test_stub_const.rb
|