rspec-given 2.4.4 → 3.0.0

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -2
  3. data/Gemfile.lock +6 -10
  4. data/README.md +223 -73
  5. data/README.old +226 -76
  6. data/Rakefile +26 -17
  7. data/TODO +13 -0
  8. data/examples/example_helper.rb +8 -1
  9. data/examples/integration/and_spec.rb +6 -11
  10. data/examples/integration/focused_line_spec.rb +2 -1
  11. data/examples/integration/given_spec.rb +19 -9
  12. data/examples/integration/invariant_spec.rb +6 -6
  13. data/examples/integration/then_spec.rb +0 -1
  14. data/examples/loader.rb +3 -0
  15. data/examples/minitest/assert_raises_spec.rb +25 -0
  16. data/examples/minitest_helper.rb +38 -0
  17. data/examples/stack/stack_spec.rb +2 -3
  18. data/lib/given.rb +2 -0
  19. data/lib/rspec/given.rb +1 -19
  20. data/rakelib/bundler_fix.rb +17 -0
  21. data/rakelib/gemspec.rake +161 -0
  22. data/rakelib/metrics.rake +30 -0
  23. data/rakelib/preview.rake +14 -0
  24. data/spec/lib/given/binary_operation_spec.rb +19 -0
  25. data/spec/lib/{rspec/given → given}/evaluator_spec.rb +4 -1
  26. data/spec/lib/{rspec/given → given}/ext/numeric_spec.rb +2 -2
  27. data/spec/lib/{rspec/given → given}/extensions_spec.rb +2 -2
  28. data/spec/lib/given/failure_matcher_spec.rb +83 -0
  29. data/spec/lib/given/failure_spec.rb +49 -0
  30. data/spec/lib/given/file_cache_spec.rb +26 -0
  31. data/spec/lib/{rspec/given → given}/fuzzy_number_spec.rb +2 -2
  32. data/spec/lib/{rspec/given → given}/have_failed_spec.rb +5 -4
  33. data/spec/lib/given/line_extractor_spec.rb +84 -0
  34. data/spec/lib/{rspec/given → given}/module_methods_spec.rb +2 -2
  35. data/spec/lib/{rspec/given → given}/natural_assertion_spec.rb +4 -36
  36. data/spec/lib/{rspec/given → given}/options_spec.rb +33 -33
  37. data/spec/spec_helper.rb +20 -0
  38. data/spec/support/faux_then.rb +2 -2
  39. data/spec/support/natural_assertion_control.rb +1 -1
  40. metadata +34 -41
  41. data/README +0 -679
  42. data/examples/integration/failing_spec.rb +0 -5
  43. data/lib/rspec/given/configure.rb +0 -20
  44. data/lib/rspec/given/core.rb +0 -9
  45. data/lib/rspec/given/evaluator.rb +0 -39
  46. data/lib/rspec/given/ext/numeric.rb +0 -32
  47. data/lib/rspec/given/extensions.rb +0 -262
  48. data/lib/rspec/given/failure.rb +0 -53
  49. data/lib/rspec/given/file_cache.rb +0 -19
  50. data/lib/rspec/given/fuzzy_number.rb +0 -70
  51. data/lib/rspec/given/fuzzy_shortcuts.rb +0 -1
  52. data/lib/rspec/given/have_failed.rb +0 -77
  53. data/lib/rspec/given/line_extractor.rb +0 -43
  54. data/lib/rspec/given/module_methods.rb +0 -70
  55. data/lib/rspec/given/monkey.rb +0 -41
  56. data/lib/rspec/given/natural_assertion.rb +0 -193
  57. data/lib/rspec/given/rspec1_given.rb +0 -11
  58. data/lib/rspec/given/version.rb +0 -10
  59. data/spec/lib/rspec/given/failure_spec.rb +0 -17
  60. data/spec/lib/rspec/given/file_cache_spec.rb +0 -28
  61. data/spec/lib/rspec/given/line_extractor_spec.rb +0 -86
  62. /data/spec/lib/{rspec/given → given}/ext/numeric_specifications.rb +0 -0
  63. /data/spec/lib/{rspec/given → given}/lexical_purity_spec.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fa764beb3f6235d2df486b17a82bd32e6baabf3
4
- data.tar.gz: 342b46e68f107347086b1e5b3f39c32a780ffe8c
3
+ metadata.gz: d7a5e35ac4e4c52e92a6eb72ab2e89c559de6b74
4
+ data.tar.gz: 286b8e00e812c97b483ef6e0f448b49a6bea1589
5
5
  SHA512:
6
- metadata.gz: 0ef51b6ece9777061f028324521516e2b2af557368332c8c959e311db004d12a751c6fd00b5143c676c898806e10f8696cb4601273bd3ce6f254f7b645d11e55
7
- data.tar.gz: f432743f366d21e45c54c46578f7d55c372343ae0a0efb50c753d6d3f69251bec5d370cbc6b3c682b7f472cb91f9f7a2280d0b7727d6727082372e6e2b950b14
6
+ metadata.gz: e63113d97ec75f1e5482125b35160c0323ac1e6275953dfa1f133ecfbebc99d895d261cfc18700910f832d581ff79ad0fea8c3ae1f41848a7373263e4711fa3e
7
+ data.tar.gz: a7d0d7afed6b98aceb4248072a2e80ecc3140565216db3d18be45472ec99a3ebb49b102cd4f2ce1101cf883e339973c73bed3acee53987807dc1ed0b59ed17af
data/Gemfile CHANGED
@@ -1,3 +1,6 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
3
- gem 'rake'
2
+
3
+ gem 'rake'
4
+ gem 'rspec', '>= 2.12'
5
+ gem 'minitest', '>= 4.3'
6
+ gem 'sorcerer', '>= 0.3.7'
data/Gemfile.lock CHANGED
@@ -1,20 +1,14 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rspec-given (2.4.1)
5
- rspec (>= 2.12)
6
- sorcerer (>= 0.3.7)
7
-
8
1
  GEM
9
2
  remote: https://rubygems.org/
10
3
  specs:
11
4
  diff-lcs (1.2.4)
5
+ minitest (5.0.6)
12
6
  rake (10.0.4)
13
- rspec (2.14.0)
7
+ rspec (2.14.1)
14
8
  rspec-core (~> 2.14.0)
15
9
  rspec-expectations (~> 2.14.0)
16
10
  rspec-mocks (~> 2.14.0)
17
- rspec-core (2.14.0)
11
+ rspec-core (2.14.1)
18
12
  rspec-expectations (2.14.0)
19
13
  diff-lcs (>= 1.1.3, < 2.0)
20
14
  rspec-mocks (2.14.1)
@@ -25,5 +19,7 @@ PLATFORMS
25
19
  ruby
26
20
 
27
21
  DEPENDENCIES
22
+ minitest (>= 4.3)
28
23
  rake
29
- rspec-given!
24
+ rspec (>= 2.12)
25
+ sorcerer (>= 0.3.7)
data/README.md CHANGED
@@ -1,26 +1,119 @@
1
- # rspec-given
1
+ # Given/When/Then for RSpec and Minitest
2
2
 
3
3
  | Master |
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, version 2.4.4.
7
+ Covering rspec-given, minitest-given, and given-core, version 3.0.0.
8
8
 
9
- rspec-given is an RSpec extension to allow Given/When/Then notation in
10
- RSpec specifications. It is a natural extension of the experimental
11
- work done on the Given framework.
9
+ rspec-given and minitest-given are extensions to your favorite testing
10
+ framework to allow Given/When/Then notation when writing specs.
12
11
 
13
12
  # Why Given/When/Then
14
13
 
15
14
  RSpec has done a great job of making specifications more readable for
16
- humans. However, I really like the given / when / then nature of
17
- Cucumber stories and would like to follow the same structure in my
18
- unit tests. rspec-given allows a simple given/when/then structure
19
- RSpec specifications.
15
+ humans. However, I really like the given/when/then nature of Cucumber
16
+ stories and would like to follow the same structure in my unit tests.
17
+ rspec-given (and now minitest-given) allows a simple given/when/then
18
+ structure RSpec specifications.
20
19
 
21
20
  ## Status
22
21
 
23
- rspec-given is ready for production use.
22
+ * rspec-given is ready for production use.
23
+ * minitest-given is experimental.
24
+
25
+ ### RSpec/Given
26
+
27
+ The rspec-given gem is the original given/when/then extension for
28
+ RSpec. It now depends on a given_core gem for the basic functionality
29
+ and then adds the RSpec specific code.
30
+
31
+ * rspec-given now requires RSpec version 2.12 or better.
32
+
33
+ ### Minitest/Given
34
+
35
+ A new minitest-given gem allows Given/When/Then notation directly in
36
+ Minitest::Spec specifications.
37
+
38
+ To use minitest-given, just place the following require at the top of
39
+ the file (or in a convenient spec_helper).
40
+
41
+ ```ruby
42
+ require 'minitest/given'
43
+ ```
44
+
45
+ All the features of rspec-given are available in minitest-given.
46
+
47
+ When switching from RSpec/Given to Minitest/Given, here are some
48
+ things to watch out for:
49
+
50
+ * You need to use Minitest version 4.3 or better (yes, Minitest 5.x
51
+ should work as well).
52
+
53
+ * Minitest/Given adds the missing "context" block to Minitest::Spec.
54
+
55
+ * Only one before block is allowed in any given Minitest::Spec
56
+ describe block. This doesn't effect the number of Givens you are
57
+ allowed to use, but it may surprise if you are use to RSpec.
58
+
59
+ ### Auto Selecting
60
+
61
+ If you use natural assertions exclusively in your specs, it's quite
62
+ possible to write specs that run under both RSpec and Minitest::Spec.
63
+
64
+ Use this at the start of your spec file:
65
+
66
+ ```ruby
67
+ if defined?(RSpec)
68
+ require 'rspec/given'
69
+ else
70
+ require 'minitest/autorun'
71
+ require 'minitest/given'
72
+ end
73
+ ```
74
+
75
+ See
76
+ [stack_spec.rb](https://github.com/jimweirich/rspec-given/blob/minispec/examples/stack/stack_spec.rb)
77
+ and
78
+ [example_helper.rb](https://github.com/jimweirich/rspec-given/blob/minispec/examples/example_helper.rb)
79
+
80
+ ## Installation
81
+
82
+ ### If you are using bundler
83
+
84
+ Add `rspec-given` (or `minitest-given`) to the `:test` group in the `Gemfile`:
85
+
86
+ ```ruby
87
+ group :test do
88
+ gem 'rspec-given'
89
+ end
90
+ ```
91
+
92
+ ```ruby
93
+ group :test do
94
+ gem 'minitest-given'
95
+ end
96
+ ```
97
+
98
+ Download and install:
99
+
100
+ `$ bundle`
101
+
102
+ Then just require `rspec/given` (or `minitest/given`) in the
103
+ `spec_helper` of your project and it is ready to go.
104
+
105
+ ### If you are not using bundler
106
+
107
+ Install the gem:
108
+
109
+ `$ gem install rspec-given`
110
+
111
+ or
112
+
113
+ `$ gem install minitest-given`
114
+
115
+ Then just require `rspec/given` (or `minitest/given`) in the
116
+ `spec_helper` of your project and it is ready to go.
24
117
 
25
118
  ## Example
26
119
 
@@ -39,22 +132,22 @@ describe Stack do
39
132
  end
40
133
 
41
134
  Given(:stack) { stack_with(initial_contents) }
42
- Invariant { stack.empty?.should == (stack.depth == 0) }
135
+ Invariant { stack.empty? == (stack.depth == 0) }
43
136
 
44
137
  context "with no items" do
45
138
  Given(:initial_contents) { [] }
46
- Then { stack.depth.should == 0 }
139
+ Then { stack.depth == 0 }
47
140
 
48
141
  context "when pushing" do
49
142
  When { stack.push(:an_item) }
50
143
 
51
- Then { stack.depth.should == 1 }
52
- Then { stack.top.should == :an_item }
144
+ Then { stack.depth == 1 }
145
+ Then { stack.top == :an_item }
53
146
  end
54
147
 
55
148
  context "when popping" do
56
149
  When(:result) { stack.pop }
57
- Then { result.should have_failed(Stack::UnderflowError, /empty/) }
150
+ Then { result == Failure(Stack::UnderflowError, /empty/) }
58
151
  end
59
152
  end
60
153
 
@@ -64,8 +157,8 @@ describe Stack do
64
157
  context "when popping" do
65
158
  When(:pop_result) { stack.pop }
66
159
 
67
- Then { pop_result.should == :an_item }
68
- Then { stack.depth.should == 0 }
160
+ Then { pop_result == :an_item }
161
+ Then { stack.depth == 0 }
69
162
  end
70
163
  end
71
164
 
@@ -76,16 +169,16 @@ describe Stack do
76
169
  context "when pushing" do
77
170
  When { stack.push(:new_item) }
78
171
 
79
- Then { stack.top.should == :new_item }
80
- Then { stack.depth.should == original_depth + 1 }
172
+ Then { stack.top == :new_item }
173
+ Then { stack.depth == original_depth + 1 }
81
174
  end
82
175
 
83
176
  context "when popping" do
84
177
  When(:pop_result) { stack.pop }
85
178
 
86
- Then { pop_result.should == :top_item }
87
- Then { stack.top.should == :second_item }
88
- Then { stack.depth.should == original_depth - 1 }
179
+ Then { pop_result == :top_item }
180
+ Then { stack.top == :second_item }
181
+ Then { stack.depth == original_depth - 1 }
89
182
  end
90
183
  end
91
184
  end
@@ -252,7 +345,7 @@ should use an empty _Then_ clause, like this:
252
345
  #### Then examples:
253
346
 
254
347
  ```ruby
255
- Then { stack.should be_empty }
348
+ Then { stack.empty? }
256
349
  ```
257
350
 
258
351
  After the related block for the _When_ clause is run, the stack should
@@ -299,9 +392,9 @@ stick with _Then_ clauses.
299
392
  #### Then/And examples:
300
393
 
301
394
  ```ruby
302
- Then { pop_result.should == :top_item } # Required
303
- And { stack.top.should == :second_item } # No Setup rerun
304
- And { stack.depth.should == original_depth - 1 } # ... for these
395
+ Then { pop_result == :top_item } # Required
396
+ And { stack.top == :second_item } # No Setup rerun
397
+ And { stack.depth == original_depth - 1 } # ... for these
305
398
  ```
306
399
 
307
400
  ### Invariant
@@ -365,29 +458,56 @@ clauses and _before_ blocks.
365
458
 
366
459
  ## Natural Assertions
367
460
 
368
- **NOTE:** <em>Natural assertions are currently an experimental feature
369
- of RSpec/Given. They are currently disabled by default, but can be
370
- enabled by a simple configuration option (see "use_natural_assertions"
371
- below).</em>
372
-
373
461
  RSpec/Given now supports the use of "natural assertions" in _Then_,
374
462
  _And_, and _Invariant_ blocks. Natural assertions are just Ruby
375
463
  conditionals, without the _should_ or _expect_ methods that RSpec
376
- provides. Here are the Then/And examples from above, but written using
377
- natural assertions:
464
+ provides. Here are the Then/And examples showing natural assertions:
465
+
466
+ ### Using Natural Assertions
467
+
468
+ ```ruby
469
+ Then { stack.top == :second_item }
470
+ Then { stack.depth == original_depth - 1 }
471
+ Then { result == Failure(Stack::UnderflowError, /empty/) }
472
+ ```
473
+
474
+ ### Using RSpec expect().to
475
+
476
+ ```ruby
477
+ Then { expect(stack.top).to eq(:second_item) }
478
+ Then { expect(stack.depth).to eq(original_depth - 1) }
479
+ Then { expect(result).to have_failed(Stack::UnderflowError, /empty/) }
480
+ ```
481
+
482
+ ### Using Minitest asserts
483
+
484
+ ```ruby
485
+ Then { assert_equal :second_item, stack.top }
486
+ Then { assert_equal original_depth - 1, stack.depth }
487
+ Then {
488
+ assert_raises(Stack::UnderflowError, /empty/) do
489
+ result.call()
490
+ end
491
+ }
492
+ ```
493
+
494
+ ### Using Minitest expectations
378
495
 
379
496
  ```ruby
380
- Then { pop_result == :top_item }
381
- And { stack.top == :second_item }
382
- And { stack.depth == original_depth - 1 }
497
+ Then { stack.top.must_equal :second_item }
498
+ Then { stack.depth.must_equal original_depth - 1}
499
+ Then { result.must_raise(Stack::UnderflowError, /empty/) }
383
500
  ```
384
501
 
385
- Natural assertions must be enabled, either globally or on a per
386
- context basis, to be recognized.
502
+ ### Disabling Natural Assertions
387
503
 
388
- Here's a heads up: If you use natural assertions, but fail to enable
389
- them, all your specs will mysteriously pass. This is why the **red**
390
- part of _Red/Green/Refactor_ is so important.
504
+ Natural assertions may be disabled, either globally or on a per
505
+ context basis. See the **configuration** section below to see how to
506
+ disable natural assertions project wide.
507
+
508
+ Here's a heads up: If you use natural assertions, but configure Given
509
+ to disable them, then all your specs will mysteriously pass. This is
510
+ why the **red** part of _Red/Green/Refactor_ is so important.
391
511
 
392
512
  ### Failure Messages with Natural Assertions
393
513
 
@@ -398,7 +518,7 @@ analsysis of the expression that failed.
398
518
  For example, given the following failing specification:
399
519
 
400
520
  ```ruby
401
- RSpec::Given.use_natural_assertions
521
+ Given.use_natural_assertions
402
522
 
403
523
  describe "Natural Assertions" do
404
524
  Given(:foo) { 1 }
@@ -432,6 +552,19 @@ Natural assertions will give additional information (e.g. "expected:
432
552
  comparison operators (==, !=, <, <=, >, >=) or matching operators (=~,
433
553
  !~).
434
554
 
555
+ ### Checking for exceptions with Natural Assertions
556
+
557
+ If you wish to see if the result of a _When_ clause is an exception,
558
+ you can use the following:
559
+
560
+ ```ruby
561
+ When(:result) { stack.pop }
562
+ Then { result == Failure(UnderflowError, /empty/) }
563
+ ```
564
+
565
+ The <code>Failure()</code> method accepts the same arguments as
566
+ <code>have_failed</code> and <code>raise_error</code>.
567
+
435
568
  ### Caveats on Natural Assertions
436
569
 
437
570
  Keep the following in mind when using natural assertions.
@@ -480,23 +613,22 @@ like this is good:
480
613
  ```
481
614
 
482
615
  It is good to note that non-idempotent assertions will also cause
483
- problems with And clauses.
616
+ problems with And and Invariant clauses.
484
617
 
485
618
  ### Mixing Natural Assertions and RSpec Assertions
486
619
 
487
- Natural assertions and RSpec assertions for the most part can be
488
- intermixed in a single test suite, even within a single context.
489
- Because there are a few corner cases that might cause problems, they
490
- must be explicitly enabled before they will be considered.
491
-
492
- To enable natural assertions in a context, call the
493
- _use_natural_assertions_ method in that context. For example:
620
+ Natural assertions, RSpec should assertions and Minitest assertions
621
+ can be intermixed in a single test suite, even within a single
622
+ context.
494
623
 
495
624
  ```ruby
496
625
  context "Outer" do
497
- use_natural_assertions
498
-
499
626
  context "Inner" do
627
+ Then { a == b } # Natural Assertions
628
+ Then { a.should == b } # RSpec style
629
+ Then { expect(a).to eq(b) } # RSpec style
630
+ Then { assert_equal b, a } # Minitest style
631
+ Then { a.must_equal b } # Minitest style
500
632
  end
501
633
 
502
634
  context "Disabled" do
@@ -509,7 +641,7 @@ Both the _Outer_ and _Inner_ contexts will use natural assertions. The
509
641
  _Disabled_ context overrides the setting inherited from _Outer_ and
510
642
  will not process natural assertions.
511
643
 
512
- See the **configuration** section below to see how to enable natural
644
+ See the **configuration** section below to see how to disable natural
513
645
  assertions project wide.
514
646
 
515
647
  ### Matchers and Natural Assertions
@@ -554,7 +686,7 @@ There are several ways of creating fuzzy numbers:
554
686
 
555
687
  * <code>about(n)</code> -- Same as <code>about(n).epsilon(10)</code>.
556
688
 
557
- When the file <code>rspec/given/fuzzy_shortcuts</code> is required,
689
+ When the file <code>given/fuzzy_shortcuts</code> is required,
558
690
  the following unicode shortcut methods are added to Numeric to create
559
691
  fuzzy numbers.
560
692
 
@@ -571,7 +703,7 @@ fuzzy numbers.
571
703
 
572
704
  The RSpec matcher used for detecting exceptions will work with natural
573
705
  assertions out of the box. Just check for equality against the
574
- <code>have_failed</code> return value.
706
+ <code>Failure()</code> method return value.
575
707
 
576
708
  For example, the following two Then clauses are equivalent:
577
709
 
@@ -580,7 +712,7 @@ For example, the following two Then clauses are equivalent:
580
712
  Then { result.should have_failed(StandardError, /message/) }
581
713
 
582
714
  # Using natural assertions
583
- Then { result == have_failed(StandardError, /message/) }
715
+ Then { result == Failure(StandardError, /message/) }
584
716
  ```
585
717
 
586
718
  ### Processing Natural Assertions
@@ -594,7 +726,9 @@ following are true:
594
726
  1. The block returns false (blocks that return true pass the
595
727
  assertion and don't need a failure message).
596
728
 
597
- 1. The block does not use RSpec's _should_ or _expect_ methods.
729
+ 1. The block does not use the native frameworks assertions or
730
+ expectations (e.g. RSpec's _should_ or _expect_ methods, or
731
+ Minitest's _assert\_xxx_ or _must\_xxx_ methods).
598
732
 
599
733
  Detecting that last point (the use of _should_ and _expect_) is done
600
734
  by modifying the RSpec runtime to report uses of _should_ and
@@ -604,11 +738,11 @@ _expect_.
604
738
 
605
739
  Natural assertions use the Ripper library to parse the failing
606
740
  condition and find all the sub-expression values upon a failure.
607
- Currently Ripper is not supported on JRuby 1.7.2. Charles Nutter has
608
- said that Ripper support is coming soon and may arrive as early as
609
- version 1.7.3. Until then, natural assertions are disabled when
610
- running under JRuby. Never fear, JRuby supports all the other features
611
- of rspec-given and will work just fine.
741
+ Currently Ripper is not fully supported on JRuby 1.7.4. Charles Nutter
742
+ has said that Ripper support is coming soon and may arrive soon. Until
743
+ then, natural assertions are disabled when running under JRuby. Never
744
+ fear, JRuby supports all the other features of rspec-given and will
745
+ work just fine.
612
746
 
613
747
  ### Further Reading
614
748
 
@@ -619,9 +753,6 @@ Conover](http://rubygems.org/profiles/sconoversf).
619
753
 
620
754
  ## Configuration
621
755
 
622
- Just require 'rspec/given' in the spec helper of your project and it
623
- is ready to go.
624
-
625
756
  If the RSpec format option document, html or textmate is chosen,
626
757
  RSpec/Given will automatically add additional source code information to
627
758
  the examples to produce better looking output. If you don't care about
@@ -629,7 +760,7 @@ the pretty output and wish to disable source code caching
629
760
  unconditionally, then add the following line to your spec helper file:
630
761
 
631
762
  ```ruby
632
- RSpec::Given.source_caching_disabled = true
763
+ Given.source_caching_disabled = true
633
764
  ```
634
765
 
635
766
  Natural assertions are disabled by default. To globally configure
@@ -637,20 +768,39 @@ natural assertions, add one of the following lines to your spec_helper
637
768
  file:
638
769
 
639
770
  ```ruby
640
- RSpec::Given.use_natural_assertions # Enable natural assertions
641
- RSpec::Given.use_natural_assertions true # Same as above
642
- RSpec::Given.use_natural_assertions false # Disable natural assertions
643
- RSpec::Given.use_natural_assertions :always # Always process natural assertions
644
- # ... even when should/expect are detected
771
+ Given.use_natural_assertions # Enable natural assertions
772
+ Given.use_natural_assertions true # Same as above
773
+ Given.use_natural_assertions false # Disable natural assertions
774
+ Given.use_natural_assertions :always # Always process natural assertions
775
+ # ... even when should/expect are detected
645
776
  ```
646
777
 
647
778
  # License
648
779
 
649
- RSpec-Given is available under the MIT License. See the MIT-LICENSE
650
- file in the source distribution.
780
+ rspec-given, minitest-given and given_core are available under the MIT
781
+ License. See the MIT-LICENSE file in the source distribution.
651
782
 
652
783
  # History
653
784
 
785
+ * Version 3.0.0
786
+
787
+ * Support for minitest added.
788
+
789
+ * Introduced gem given_core to contain the common logic between the
790
+ RSpec and Minitest versions. Both the rspec-given gem and the
791
+ minitest-given gem have a dependency on given_core.
792
+
793
+ * Natural assertions are now enabled by default.
794
+
795
+ * Version 2.4.4
796
+
797
+ * Support for RSpec 2.13 added.
798
+
799
+ * Version 2.4.3
800
+
801
+ * Better natural assertion messages when dealing with multi-line
802
+ output.
803
+
654
804
  * Version 2.4.2
655
805
 
656
806
  * Minor adjustment to natural assertion error messages to better