minitest-given 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -0
- data/README.md +10 -6
- data/examples/integration/failing/oddly_formatted_then.rb +7 -0
- data/examples/integration/failing_messages_spec.rb +7 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 813e5bcd3a32e186d24d062d76d150936e5ccd90
|
4
|
+
data.tar.gz: 2289229131914a406dffd26af1d5e8b2a2f5cd0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74db303009f34400cf4ab7c536025d0cb64b2a39066547f909ac94c48aef1a89af3eaaaf6b65955dc34157fcf4697004be13ffa4a9d71b163512e10d451b0236
|
7
|
+
data.tar.gz: d97e010285c0e666ad2fd1791d621bed72640b1eb4e5293d82dda6f399f5ac54c31ee10adef8abd6d9d89ff91a88717772cf43670ba8838bfa27cde97d03798a
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
| :----: |
|
5
5
|
| [![Master Build Status](https://secure.travis-ci.org/jimweirich/rspec-given.png?branch=master)](https://travis-ci.org/jimweirich/rspec-given) |
|
6
6
|
|
7
|
-
Covering rspec-given, minitest-given, and given-core, version 3.
|
7
|
+
Covering rspec-given, minitest-given, and given-core, version 3.5.0.
|
8
8
|
|
9
9
|
rspec-given and minitest-given are extensions to your favorite testing
|
10
10
|
framework to allow Given/When/Then notation when writing specs.
|
@@ -758,11 +758,15 @@ _expect_.
|
|
758
758
|
|
759
759
|
### Platform Support
|
760
760
|
|
761
|
-
|
762
|
-
|
761
|
+
Given uses the Ripper library to parse the source lines and failing
|
762
|
+
conditions to find all the sub-expression values upon a failure.
|
763
763
|
Currently Ripper is not supported on Rubinius and versions of JRuby
|
764
|
-
prior to JRuby-1.7.5.
|
765
|
-
|
764
|
+
prior to JRuby-1.7.5.
|
765
|
+
|
766
|
+
If you want to use a version of Ruby that does not support Ripper,
|
767
|
+
then natural assertions will disabled. In addition, you should also
|
768
|
+
disable source caching in the configuration (see the configuration
|
769
|
+
section below).
|
766
770
|
|
767
771
|
### Non-Spec Assertions
|
768
772
|
|
@@ -787,7 +791,7 @@ end
|
|
787
791
|
|
788
792
|
To use the non-testing assertions, you need to require the
|
789
793
|
'given/assertions' file and then include the
|
790
|
-
|
794
|
+
code>Given::Assertions</code> module into what ever class is using
|
791
795
|
the
|
792
796
|
<code>Precondition</code>/<code>Postcondition</code>/<code>Assert</code>
|
793
797
|
methods. The code block for these assertions should always be a
|
@@ -40,4 +40,11 @@ describe "Failing Messages" do
|
|
40
40
|
Given(:failing_test) { "to_bool_returns_false.rb" }
|
41
41
|
Then { ios.out =~ /Failure\/Error: Then \{ ToBool.new \}/ }
|
42
42
|
end
|
43
|
+
|
44
|
+
context "with an oddly formatted then" do
|
45
|
+
Given(:failing_test) { "oddly_formatted_then.rb" }
|
46
|
+
Then { ios.out =~ /Failure\/Error: Then \{ result == \['a',$/ }
|
47
|
+
And { ios.out =~ /expected: "anything"/ }
|
48
|
+
And { ios.out =~ /to equal: \["a", "a"\]/ }
|
49
|
+
end
|
43
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-given
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: given_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- examples/integration/and_spec.rb
|
61
61
|
- examples/integration/failing/eval_subexpression_spec.rb
|
62
62
|
- examples/integration/failing/module_nesting_spec.rb
|
63
|
+
- examples/integration/failing/oddly_formatted_then.rb
|
63
64
|
- examples/integration/failing/to_bool_returns_false.rb
|
64
65
|
- examples/integration/failing/undefined_method_spec.rb
|
65
66
|
- examples/integration/failing_messages_spec.rb
|