given_core 3.2.0 → 3.3.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e28db001d2b1832047c6e56918eef1dcce2b9f8e
4
- data.tar.gz: 4fd5162376e2a1519000aa24934e0ca0f17eb946
3
+ metadata.gz: 962dd1b70903f4f2c603379575ec0ddecadb7bbd
4
+ data.tar.gz: 3e09ca5a6c51cbfcb69c9f43f902266de00a38b0
5
5
  SHA512:
6
- metadata.gz: 4608612b34b5665579b3022911586c5cb6ab9d93ce17b8d94d0258473202e40d05216de9b6c7a08b354e9b851afac001c88a11a9428069bcb7efc1ab41f582e3
7
- data.tar.gz: 4778642ddd1d8a5866d7e3fb0e5ee47e22e571127f4d230530cca5b4e885ecff2fbec1a3a566f6028cea1935ba242470a295227523b09076580d60b9d0709352
6
+ metadata.gz: 9e796b0408defdd1e9b0d6f8d2519455ddb62f02dee0ff34faae4fadc1f6ac39c27e31e30e4af5d0ea94115d4a32e2e7cad1310a4f86ba6f3ccec8bba00c86db
7
+ data.tar.gz: 7b18b530a667c98b2c63b286e4f691486e69f90a7d71356c59cf911f8f4ca8606a6fdc069d22dce7cd78181cb150f5bb383477817c4c0b5a3bb1926350e8a74b
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.2.0.
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 disabled by default. To globally configure
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
 
@@ -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 = instance_eval(&block)
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
@@ -2,8 +2,9 @@
2
2
  module Given
3
3
  VERSION_NUMBERS = [
4
4
  VERSION_MAJOR = 3,
5
- VERSION_MINOR = 2,
5
+ VERSION_MINOR = 3,
6
6
  VERSION_BUILD = 0,
7
+ BETA = "beta1"
7
8
  ]
8
9
  VERSION = VERSION_NUMBERS.join(".")
9
10
  end
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.2.0
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-13 00:00:00.000000000 Z
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: '0'
102
+ version: 1.3.1
103
103
  requirements: []
104
104
  rubyforge_project: given
105
105
  rubygems_version: 2.1.11