minitest-given 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef440e58c2b20d18eda37ec00628a8d170358baa
4
- data.tar.gz: 63a0cce8ac1bedce2f7e37185d0e8ea24022e284
3
+ metadata.gz: 403560dbd53ae74c9c0888a1f074b79b7f2bd371
4
+ data.tar.gz: cb917a9b9bd0e715607a462e4cdaa3fd988da0bc
5
5
  SHA512:
6
- metadata.gz: f053f30a0f20202715a357bef5c626bae87ccac248fcf8af47d9e8c8f579f9586fad789df5e15ade74344ac6a8efbe6039f87097316c24ff7020bb0ba2e0442b
7
- data.tar.gz: d244105250a6a70994f3e3f7cf81a794376cdfd27422b2d0abefc7db30709ffff5bdd60c15db17266978aaa504badd744a00e246a8f96139001b827df325cabe
6
+ metadata.gz: 3601eb5c4fd53290de9529e711767c03b2c5103f1baa4574fae4c291611e5e80c91147d969ebce9ceaf45477ee678a5315e9cf61afc69b63cebb6a375f014a6e
7
+ data.tar.gz: be102f6ba6af80221ba33f3a9f23896e0cfdabaf557ffbdc67d752192b2302038a07d5fd5037a96da153862241b12149abf0402fbdeca2c9bad740c144772503
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
 
@@ -1,5 +1,4 @@
1
1
  require 'rspec/given'
2
- require 'rspec/given/natural_assertion'
3
2
 
4
3
  describe "Natural Assertions" do
5
4
  use_natural_assertions
@@ -0,0 +1,12 @@
1
+ require 'rspec/given'
2
+
3
+ class ToBool
4
+ def to_bool
5
+ false
6
+ end
7
+ end
8
+
9
+ describe "Then with nesting" do
10
+ use_natural_assertions
11
+ Then { ToBool.new }
12
+ end
@@ -35,4 +35,9 @@ describe "Failing Messages" do
35
35
  And { ios.out =~ /1 *<- index$/ }
36
36
  And { ios.out =~ /"X" *<- value$/ }
37
37
  end
38
+
39
+ context "when returning false from ToBool" do
40
+ Given(:failing_test) { "to_bool_returns_false.rb" }
41
+ Then { ios.out =~ /Failure\/Error: Then \{ ToBool.new \}/ }
42
+ end
38
43
  end
@@ -1,8 +1,21 @@
1
1
  require 'example_helper'
2
2
 
3
+ class ToBool
4
+ def initialize(bool)
5
+ @bool = bool
6
+ end
7
+ def to_bool
8
+ @bool
9
+ end
10
+ end
11
+
3
12
  describe "Then" do
4
13
  context "empty thens with natural assertions" do
5
14
  use_natural_assertions_if_supported
6
15
  Then { }
7
16
  end
17
+ context "thens to_bool/true will pass" do
18
+ use_natural_assertions_if_supported
19
+ Then { ToBool.new(true) }
20
+ end
8
21
  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.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: given_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.0
19
+ version: 3.3.0.beta1
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.2.0
26
+ version: 3.3.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -65,6 +65,7 @@ files:
65
65
  - examples/integration/and_spec.rb
66
66
  - examples/integration/failing/eval_subexpression_spec.rb
67
67
  - examples/integration/failing/module_nesting_spec.rb
68
+ - examples/integration/failing/to_bool_returns_false.rb
68
69
  - examples/integration/failing/undefined_method_spec.rb
69
70
  - examples/integration/failing_messages_spec.rb
70
71
  - examples/integration/focused_line_spec.rb
@@ -101,9 +102,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
102
  version: 1.9.2
102
103
  required_rubygems_version: !ruby/object:Gem::Requirement
103
104
  requirements:
104
- - - '>='
105
+ - - '>'
105
106
  - !ruby/object:Gem::Version
106
- version: '0'
107
+ version: 1.3.1
107
108
  requirements: []
108
109
  rubyforge_project: given
109
110
  rubygems_version: 2.1.11