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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3769f9d39bd6466f993687a0f3df8c169b27118
4
- data.tar.gz: b041cd8182ff4ac8044e2eedc914a0196a87066f
3
+ metadata.gz: 813e5bcd3a32e186d24d062d76d150936e5ccd90
4
+ data.tar.gz: 2289229131914a406dffd26af1d5e8b2a2f5cd0a
5
5
  SHA512:
6
- metadata.gz: bcce0e56e74705ad54cbee6edef23fd17fb9241ee2cb87efd047d043c2231231fa1ffebe756a62489dd35c1ccd8ff14b1e67004967bd6b72e429ffa12a19fb07
7
- data.tar.gz: 1f6a19b866f2c00fa3016bdaec94d227ee23a27e6bf88bbd5ee867e61ed5f0e371b81fc178504ca677ab412c0a6c49f05a92da92ed01c95272c64e415eb62f45
6
+ metadata.gz: 74db303009f34400cf4ab7c536025d0cb64b2a39066547f909ac94c48aef1a89af3eaaaf6b65955dc34157fcf4697004be13ffa4a9d71b163512e10d451b0236
7
+ data.tar.gz: d97e010285c0e666ad2fd1791d621bed72640b1eb4e5293d82dda6f399f5ac54c31ee10adef8abd6d9d89ff91a88717772cf43670ba8838bfa27cde97d03798a
data/Gemfile.lock CHANGED
@@ -19,6 +19,7 @@ GEM
19
19
  sorcerer (1.0.2)
20
20
 
21
21
  PLATFORMS
22
+ java
22
23
  ruby
23
24
 
24
25
  DEPENDENCIES
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.4.0.
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
- Natural assertions use the Ripper library to parse the failing
762
- condition and find all the sub-expression values upon a failure.
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. Natural assertions are disabled in that case.
765
- However, all other features of Given are supported.
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
- <code>Given::Assertions</code> module into what ever class is using
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
@@ -0,0 +1,7 @@
1
+ require 'rspec/given'
2
+
3
+ describe "arrays split over multiple lines" do
4
+ When(:result) { 'anything' }
5
+ Then { result == ['a',
6
+ 'a'] }
7
+ end
@@ -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.0
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: 2013-12-31 00:00:00.000000000 Z
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.4.0
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.4.0
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