minitest-spec-expect 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/minitest/spec/expect.rb +6 -8
- data/minitest-spec-expect.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e507e3c0ddd656f732eee9925c3fe75cfce15bb3
|
4
|
+
data.tar.gz: 21dd1295a526d328ba43878f0afbab89252b4b31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1ae50e570ffb411f6233c08e8bfab8fbce17d8de3adb29e6c3abf06cc92b73ba18cee48bf75eb984484714c3471e5816b632ab4e7e71031d6a589074e698dd4
|
7
|
+
data.tar.gz: 2c041cb1f29119438aba2d4f3535b021e505d91cd559eb4def7e4ade37d9dcff942f82f4f04726fb08212819248384a9240bad4254f2eec418830b2ad226e387
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
#### version 1.0.0 - *December 28, 2013*
|
2
|
+
* Simplified initializer for expect object. Make stable.
|
3
|
+
|
1
4
|
#### version 0.1.0 - *May 23, 2013*
|
2
5
|
* Added ability to pass a block to `#expect`. When a block is passed to it, the expect object responds
|
3
6
|
to `#to_throw`, `#to_raise`, `#to_output`, and `#to_be_silent`. Big thanks to
|
data/README.md
CHANGED
@@ -21,8 +21,8 @@ minitest-spec-expect works in the following ruby versions and implementations:
|
|
21
21
|
* 1.9.2
|
22
22
|
* 1.9.3
|
23
23
|
* 2.0.0
|
24
|
+
* 2.1.0
|
24
25
|
* JRuby
|
25
|
-
* Rubinius
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
Wrap the object under test in an `expect()` object. Then call a Minitest expectation on it,
|
data/lib/minitest/spec/expect.rb
CHANGED
@@ -2,13 +2,13 @@ module Kernel
|
|
2
2
|
NO_ARG = Object.new
|
3
3
|
|
4
4
|
def expect arg=NO_ARG, &block
|
5
|
-
|
5
|
+
_raise_minitest_spec_expect_errors arg, block
|
6
6
|
Minitest::Spec::Expect.create arg, &block
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
10
10
|
|
11
|
-
def
|
11
|
+
def _raise_minitest_spec_expect_errors object, block
|
12
12
|
if object == NO_ARG
|
13
13
|
raise ArgumentError, 'must pass an argument or a block' if !block
|
14
14
|
else
|
@@ -20,15 +20,13 @@ end
|
|
20
20
|
require 'minitest/autorun'
|
21
21
|
|
22
22
|
class Minitest::Spec::Expect
|
23
|
-
OBJECT_UNDER_TEST =
|
23
|
+
OBJECT_UNDER_TEST = :object_under_test
|
24
24
|
|
25
25
|
attr_reader OBJECT_UNDER_TEST
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
CODE
|
27
|
+
def initialize object_under_test
|
28
|
+
@object_under_test = object_under_test
|
29
|
+
end
|
32
30
|
|
33
31
|
def self.create arg, &block
|
34
32
|
block ? ForBlock.new(block) : ForArg.new(arg)
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ['Dave Jachimiak']
|
10
10
|
s.email = 'dave.jachimiak@gmail.com'
|
11
11
|
s.homepage = 'http://github.com/davejachimiak/minitest-spec-expect'
|
12
|
-
s.version = '0.
|
12
|
+
s.version = '1.0.0'
|
13
13
|
s.files = `git ls-files`.split("\n").reject do |file_name|
|
14
14
|
/\.gem$/.match file_name
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-spec-expect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jachimiak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -76,10 +76,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.0.
|
79
|
+
rubygems_version: 2.0.6
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: Use the expect syntax with transposed minitest expectations.
|
83
83
|
test_files:
|
84
84
|
- spec/integration_spec.rb
|
85
85
|
- spec/kernel_spec.rb
|
86
|
+
has_rdoc:
|