degenerate 0.0.2 → 0.0.3

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: 088ff8eb3cf7313df055e89feba0849f4a068f67
4
- data.tar.gz: fa3bed4a61194f9a62dec3b1a0d6ba0743b81dda
3
+ metadata.gz: 189d202cb0c1d62cccba415c7b341f5ac8b60b54
4
+ data.tar.gz: 6f93193b3e86426ae326fda56f7eaf0bdbc1540a
5
5
  SHA512:
6
- metadata.gz: d927a80d809e03f85b2bb8ecd9e9877e73a449933e9f2646741a8c06af3d05c535919f8b4ecf1cd93a9f4b6913f4f5e92c39d18d823f449a7e9d45d34703013d
7
- data.tar.gz: 3b24e2ea03f4641bcb1444915e521e4b90e0cdc892f0aa972604b9d94ed89c71fdeabb389f6e5891beabc2ebea4338ac8215010b7b1042f59eaf5dc2b0738949
6
+ metadata.gz: 682ae687ce22337099b3c60c7baaf519a4311952dcf6ee9e33a7843032cfda907bbea4be1e5390f2ef55024543cc2ef468a2ad2fe387284181ef30dc3101fab1
7
+ data.tar.gz: 30580f4df11a74f56af152739f2f78f3ad791f4bd1b282d39427d2248af4af25fdd17b04504d9d9d0c0f6ebdd50c046bf27531544ae090921b39a004a7af2e36
@@ -33,7 +33,7 @@ module Degenerate
33
33
  end
34
34
 
35
35
  def self.http_status
36
- ->() { HTTP_STATUSES.sample }
36
+ ->(_={}) { HTTP_STATUSES.sample }
37
37
  end
38
38
 
39
39
  private
@@ -1,3 +1,3 @@
1
1
  module Degenerate
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -98,4 +98,35 @@ RSpec.describe Degenerate::Generators do
98
98
  end
99
99
  end
100
100
  end
101
+
102
+ describe "all generators" do
103
+ generative do
104
+ data(:with_arg) { generate(:any_with_arg) }
105
+ data(:without_arg) { generate(:any_without_arg) }
106
+
107
+ it "accepts an argument" do
108
+ expect { with_arg }.not_to raise_error
109
+ end
110
+
111
+ it "doesn't require an arg" do
112
+ expect { without_arg }.not_to raise_error
113
+ end
114
+
115
+ Generative.register_generator(:any_with_arg) do |_|
116
+ generator = Generative.manager.generators.keys.select { |g|
117
+ !g.to_s.match(/any/)
118
+ }.sample
119
+
120
+ Generative.find_and_call(generator, limit: 10)
121
+ end
122
+
123
+ Generative.register_generator(:any_without_arg) do |_|
124
+ generator = Generative.manager.generators.keys.select { |g|
125
+ !g.to_s.match(/any/)
126
+ }.sample
127
+
128
+ Generative.find_and_call(generator)
129
+ end
130
+ end
131
+ end
101
132
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: degenerate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate West