given_core 3.2.0 → 3.3.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/given/extensions.rb +9 -1
- data/lib/given/version.rb +2 -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: 962dd1b70903f4f2c603379575ec0ddecadb7bbd
|
4
|
+
data.tar.gz: 3e09ca5a6c51cbfcb69c9f43f902266de00a38b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e796b0408defdd1e9b0d6f8d2519455ddb62f02dee0ff34faae4fadc1f6ac39c27e31e30e4af5d0ea94115d4a32e2e7cad1310a4f86ba6f3ccec8bba00c86db
|
7
|
+
data.tar.gz: 7b18b530a667c98b2c63b286e4f691486e69f90a7d71356c59cf911f8f4ca8606a6fdc069d22dce7cd78181cb150f5bb383477817c4c0b5a3bb1926350e8a74b
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
| :----: |
|
5
5
|
| [](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.3.0.beta1.
|
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.
|
@@ -830,7 +830,7 @@ unconditionally, then add the following line to your spec helper file:
|
|
830
830
|
Given.source_caching_disabled = true
|
831
831
|
```
|
832
832
|
|
833
|
-
Natural assertions are
|
833
|
+
Natural assertions are enabled by default. To globally configure
|
834
834
|
natural assertions, add one of the following lines to your spec_helper
|
835
835
|
file:
|
836
836
|
|
data/lib/given/extensions.rb
CHANGED
@@ -103,15 +103,23 @@ module Given
|
|
103
103
|
_gvn_check_ands
|
104
104
|
end
|
105
105
|
|
106
|
+
# Determine of the natural assertion pass/fail status of the block
|
107
|
+
def _gvn_block_passed?(block)
|
108
|
+
passed = instance_eval(&block)
|
109
|
+
passed = passed.to_bool if passed.respond_to?(:to_bool)
|
110
|
+
passed
|
111
|
+
end
|
112
|
+
|
106
113
|
# Evaluate a Then, And, or Invariant assertion.
|
107
114
|
def _gvn_evaluate(clause_type, block) # :nodoc:
|
108
115
|
Given.start_evaluation
|
109
|
-
passed =
|
116
|
+
passed = _gvn_block_passed?(block)
|
110
117
|
if ! Given.explicit_assertions? && _gvn_na_configured?
|
111
118
|
_gvn_naturally_assert(clause_type, block, passed)
|
112
119
|
end
|
113
120
|
end
|
114
121
|
|
122
|
+
# Naturally assert the block (based on +passed+).
|
115
123
|
def _gvn_naturally_assert(clause_type, block, passed)
|
116
124
|
Given.count_assertion
|
117
125
|
unless passed
|
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.
|
4
|
+
version: 3.3.0.beta1
|
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-17 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: 1.3.1
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project: given
|
105
105
|
rubygems_version: 2.1.11
|