generative 0.2.3 → 0.2.4

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: 158ce02f8dafad88e05e39b3e0cb6f3b92a99355
4
- data.tar.gz: 3b8b882323e49a5a933f722d98a7a3107c9c0627
3
+ metadata.gz: 57a1eb1a5f589c2b3aad9704083766c9cc529815
4
+ data.tar.gz: a4e6e4aec51577f305c18fa444977b001ea88db1
5
5
  SHA512:
6
- metadata.gz: 0ca4ef37e1af53415cc047d5ded198a16ce83efa54e6fd3a2668842d34b8aa2ea2c9536d957e01e643c53c135ac08d1f5eb66ce465f9502ec47fbfd73d483356
7
- data.tar.gz: c6789ce2de1e5a4fd9dc0822f34e2903fb612c8a843cf6c1446c135383472f33a2c4cf1565c6a506108072d8401d7356d4e192098feb47b84b752d99a52aee2f
6
+ metadata.gz: b094dbd6215c67423b70a2afd3d4d5f55dbad80cc3d4135c8ace6326229aa02ce7af4c03ab16c00b7b32302cd5a2669e0ec34737cbba4645533a026569978850
7
+ data.tar.gz: 845d6d14b2bd4aa044f3dce2c4d2d5d0b244748455ad86eb0efcfcb629b2bd45e1b48f7214076bcbf4eb049c0e05fdcc4ba32747031de70acff9673a8c1cb5d1
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1
3
+ - 2.1.10
4
+ - 2.2.5
5
+ - 2.3.1
6
6
  - ruby-head
7
7
  matrix:
8
8
  allow_failures:
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Generative
2
2
 
3
- > Generative testing for RSpec
3
+ > Generative and property-based testing for RSpec
4
4
  > [![Gem Version](https://badge.fury.io/rb/generative.png)](http://badge.fury.io/rb/generative)
5
5
  > [![Build Status](https://travis-ci.org/justincampbell/generative.png?branch=master)](https://travis-ci.org/justincampbell/generative)
6
6
  > [![Code Climate](https://codeclimate.com/github/justincampbell/generative.png)](https://codeclimate.com/github/justincampbell/generative)
@@ -22,7 +22,7 @@ end
22
22
 
23
23
  ```
24
24
  --color
25
- --format progress
25
+ --format Generative::Formatter
26
26
  --require generative
27
27
  ```
28
28
 
@@ -71,6 +71,22 @@ describe String do
71
71
  end
72
72
  ```
73
73
 
74
+ Alternatively, you can modify existing specs in a minimally intrusive way by just adding two tags to an existing context and using the fact that `data` is just an alias for `let`:
75
+ ```ruby
76
+ describe String do
77
+ describe "#reverse", generative: true, order: :generative do
78
+ let(:string) { rand(12345).to_s }
79
+
80
+ it "maintains length" do
81
+ expect(string.reverse.length).to eq(string.length)
82
+ end
83
+
84
+ it "is not destructive" do
85
+ expect(string.reverse.reverse).to eq(string)
86
+ end
87
+ end
88
+ end
89
+ ```
74
90
  ### Running
75
91
 
76
92
  Generative comes with a `generative` command, which simply runs rspec with the
@@ -79,7 +95,7 @@ required arguments:
79
95
  ```
80
96
  $ generative
81
97
  + GENERATIVE_COUNT=10_000
82
- + rspec --require generative --format Generative --tag generative
98
+ + rspec --require generative --format Generative::Formatter --tag generative
83
99
  Run options: include {:generative=>true}
84
100
 
85
101
  String
@@ -191,7 +207,7 @@ data and maybe even package them up as your own gems. If you
191
207
  do, let us know and we'll link to it here.
192
208
 
193
209
 
194
- #### Degenerate
210
+ #### [Degenerate](https://github.com/niftyn8/degenerate)
195
211
 
196
212
  This library has a few generators for some basic primitives... A great start if
197
213
  you're looking to move quickly.
@@ -10,11 +10,11 @@ authors = {
10
10
 
11
11
  Gem::Specification.new do |gem|
12
12
  gem.name = 'generative'
13
- gem.version = '0.2.3'
13
+ gem.version = '0.2.4'
14
14
  gem.authors = authors.keys
15
15
  gem.email = authors.values
16
- gem.description = "Generative testing for RSpec"
17
- gem.summary = "Generative testing for RSpec"
16
+ gem.description = "Generative and property-based testing for RSpec"
17
+ gem.summary = "Generative and property-based testing for RSpec"
18
18
  gem.homepage = "https://github.com/justincampbell/generative"
19
19
  gem.license = 'MIT'
20
20
 
@@ -37,7 +37,8 @@ module Generative
37
37
  output.puts if @group_level == 0
38
38
 
39
39
  if generative?(example_group)
40
- output.puts "#{current_indentation}#{detail_color('generative')}"
40
+ group_description = "#{example_group.description} (generative)"
41
+ output.puts "#{current_indentation}#{detail_color(group_description)}"
41
42
 
42
43
  @group_level += 1
43
44
  example_group.examples.each do |example|
@@ -8,7 +8,7 @@ module Generative
8
8
 
9
9
  self.name = :generative if name == :spec
10
10
 
11
- desc "Run Generative specs" unless Rake.application.last_comment
11
+ desc "Run Generative specs" unless Rake.application.last_description
12
12
 
13
13
  options = %w[
14
14
  --require generative
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: generative
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Campbell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-16 00:00:00.000000000 Z
13
+ date: 2016-09-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -40,7 +40,7 @@ dependencies:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
- description: Generative testing for RSpec
43
+ description: Generative and property-based testing for RSpec
44
44
  email:
45
45
  - justin@justincampbell.com
46
46
  - danmcclory@gmail.com
@@ -92,10 +92,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.2.2
95
+ rubygems_version: 2.6.4
96
96
  signing_key:
97
97
  specification_version: 4
98
- summary: Generative testing for RSpec
98
+ summary: Generative and property-based testing for RSpec
99
99
  test_files:
100
100
  - spec/generative/generator_manager_spec.rb
101
101
  - spec/generative/ordering_spec.rb