given_core 3.3.0.beta2 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -1
- data/lib/given/version.rb +0 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a23d03f3e0141c051c84b2b405c84ab47c15605d
|
4
|
+
data.tar.gz: d8ddf0ac6cf6289b042f1efbdac1c797c8a2a358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a48e5c92dcef171c12628ddc18e7daac2024e385da10a18f158caca2dbe68f45fa9b75c190732d9cbab7d8bdb2823ae22098e33c58d5e6292929b6c258fe5e8d
|
7
|
+
data.tar.gz: f9ed5640e35416aa45dc9f64cb60c1bf52a4c6f02334a5f0a28b781d46855f3c2ea810de6011bce1fb2efd53e5abeb2b30403bf5c468f01433442120c64ae36e
|
data/README.md
CHANGED
@@ -466,7 +466,24 @@ clauses and _before_ blocks.
|
|
466
466
|
RSpec/Given now supports the use of "natural assertions" in _Then_,
|
467
467
|
_And_, and _Invariant_ blocks. Natural assertions are just Ruby
|
468
468
|
conditionals, without the _should_ or _expect_ methods that RSpec
|
469
|
-
provides.
|
469
|
+
provides.
|
470
|
+
|
471
|
+
When using natural assertions, the value of the _Then_ expression
|
472
|
+
determines the pass/fail state of the test. If the expression is
|
473
|
+
true, the test passes. If the test is false, the test fails.
|
474
|
+
|
475
|
+
If the _Then_ expression executes an RSpec (or MiniTest) assertion
|
476
|
+
(e.g. uses <code>should</code>, <code>expect</code> or
|
477
|
+
<code>assert_xxx</code>), then the true/false value will be ignored.
|
478
|
+
This allows natural assertions and regular assertions clauses to be
|
479
|
+
intermixed at will.
|
480
|
+
|
481
|
+
In addition, if the value of a _Then_ class returns an object that
|
482
|
+
responds to <code>to_bool</code>, then <code>to_bool</code> will be
|
483
|
+
called and the return value of that will be used to determine if the
|
484
|
+
test passed or failed.
|
485
|
+
|
486
|
+
Here are the Then/And examples showing natural assertions:
|
470
487
|
|
471
488
|
### Using Natural Assertions
|
472
489
|
|
@@ -849,6 +866,11 @@ License. See the MIT-LICENSE file in the source distribution.
|
|
849
866
|
|
850
867
|
# History
|
851
868
|
|
869
|
+
* Version 3.3.0
|
870
|
+
|
871
|
+
* Add support for <code>to_bool</code>.
|
872
|
+
* Restrict length of inspect strings printed to 2000 characters.
|
873
|
+
|
852
874
|
* Version 3.2.0
|
853
875
|
|
854
876
|
* Add support for RSpec 3 beta
|
data/lib/given/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: given_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.0
|
4
|
+
version: 3.3.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: 2013-12-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorcerer
|
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: 1.9.2
|
98
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - '
|
100
|
+
- - '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project: given
|
105
105
|
rubygems_version: 2.1.11
|