json_test_data 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -11
- data/README.md +1 -1
- data/features/array_constraints.feature +15 -4
- data/features/data_types.feature +3 -9
- data/features/generate_data.feature +2 -8
- data/features/generate_empty_objects.feature +2 -8
- data/features/nested_objects_and_arrays.feature +4 -16
- data/features/numeric_constraints.feature +5 -20
- data/features/object_constraints.feature +2 -5
- data/features/step_definitions/json_test_data_steps.rb +2 -16
- data/features/string_constraints.feature +2 -2
- data/features/support/env.rb +1 -1
- data/json_test_data.gemspec +9 -10
- data/lib/json_test_data/data_structures/number.rb +1 -12
- data/lib/json_test_data/json_schema.rb +1 -1
- data/spec/json_test_data/data_structures/number_spec.rb +2 -2
- data/spec/json_test_data/json_schema_spec.rb +33 -30
- data/spec/matchers/json_schema_matchers.rb +8 -0
- data/spec/spec_helper.rb +1 -2
- data/version.rb +1 -1
- metadata +10 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd5fc0f13b45a7b50daab986818743a431b880cb
|
4
|
+
data.tar.gz: 40aa2874ac448a29b96e7e078ed33785b20b1804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f20126004662b200b649b8ce669c706ee76f4c6a658932b58ef0ef91fa664ef78a06621c57691cd4d129f41be6cd20190cf3d18c9e0a760afb5026518c6f503
|
7
|
+
data.tar.gz: e9664ea19d7bffbebee080bd1ec7ecfbf439f4e4897dcffb4fc2dd5348a8de2d213aff9028f724226b91e3b82485b4c227ed812cb1c2a4f03445778ad83d9a88
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
json_test_data (0.
|
4
|
+
json_test_data (0.7.0)
|
5
5
|
regxing (~> 0.1.0.beta)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
+
addressable (2.3.8)
|
10
11
|
builder (3.2.2)
|
11
|
-
coderay (1.1.1)
|
12
12
|
coveralls (0.8.13)
|
13
13
|
json (~> 1.8)
|
14
14
|
simplecov (~> 0.11.0)
|
@@ -30,15 +30,12 @@ GEM
|
|
30
30
|
docile (1.1.5)
|
31
31
|
gherkin (3.2.0)
|
32
32
|
json (1.8.3)
|
33
|
-
|
33
|
+
json-schema (2.6.1)
|
34
|
+
addressable (~> 2.3.8)
|
34
35
|
multi_json (1.11.3)
|
35
36
|
multi_test (0.1.2)
|
36
|
-
pry (0.10.3)
|
37
|
-
coderay (~> 1.1.0)
|
38
|
-
method_source (~> 0.8.1)
|
39
|
-
slop (~> 3.4)
|
40
37
|
rake (11.1.2)
|
41
|
-
regxing (0.1.0
|
38
|
+
regxing (0.1.0)
|
42
39
|
rspec (3.4.0)
|
43
40
|
rspec-core (~> 3.4.0)
|
44
41
|
rspec-expectations (~> 3.4.0)
|
@@ -57,7 +54,6 @@ GEM
|
|
57
54
|
json (~> 1.8)
|
58
55
|
simplecov-html (~> 0.10.0)
|
59
56
|
simplecov-html (0.10.0)
|
60
|
-
slop (3.6.0)
|
61
57
|
term-ansicolor (1.3.2)
|
62
58
|
tins (~> 1.0)
|
63
59
|
thor (0.19.1)
|
@@ -70,11 +66,10 @@ DEPENDENCIES
|
|
70
66
|
coveralls (~> 0.7)
|
71
67
|
cucumber (~> 2.1)
|
72
68
|
json (~> 1.7)
|
69
|
+
json-schema (~> 2.6)
|
73
70
|
json_test_data!
|
74
|
-
pry (~> 0.10)
|
75
71
|
rake (~> 11.0)
|
76
72
|
rspec (~> 3.4)
|
77
|
-
simplecov (~> 0.11)
|
78
73
|
|
79
74
|
BUNDLED WITH
|
80
75
|
1.11.2
|
data/README.md
CHANGED
@@ -7,13 +7,24 @@ Feature: Array constraints
|
|
7
7
|
"type": "array",
|
8
8
|
"minItems": 4,
|
9
9
|
"items": {
|
10
|
-
"type": "number"
|
11
|
-
"minLength": 3
|
10
|
+
"type": "number"
|
12
11
|
}
|
13
12
|
}
|
14
13
|
"""
|
15
14
|
When I run the JSON data generator
|
16
|
-
Then the
|
15
|
+
Then the output should match the schema
|
16
|
+
|
17
|
+
Scenario: Unique items
|
18
|
+
Given the following JSON schema:
|
17
19
|
"""json
|
18
|
-
|
20
|
+
{
|
21
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
22
|
+
"type": "array",
|
23
|
+
"minItems": 4,
|
24
|
+
"items": {
|
25
|
+
"type": "number"
|
26
|
+
}
|
27
|
+
}
|
19
28
|
"""
|
29
|
+
When I run the JSON data generator
|
30
|
+
Then the output should match the schema
|
data/features/data_types.feature
CHANGED
@@ -17,7 +17,7 @@ Feature: Handling data types
|
|
17
17
|
}
|
18
18
|
"""
|
19
19
|
When I run the JSON data generator
|
20
|
-
Then the
|
20
|
+
Then the output should match the schema
|
21
21
|
|
22
22
|
Scenario: Numbers
|
23
23
|
Given the following JSON schema:
|
@@ -33,10 +33,7 @@ Feature: Handling data types
|
|
33
33
|
}
|
34
34
|
"""
|
35
35
|
When I run the JSON data generator
|
36
|
-
Then the
|
37
|
-
"""json
|
38
|
-
{"id":1}
|
39
|
-
"""
|
36
|
+
Then the output should match the schema
|
40
37
|
|
41
38
|
Scenario: Booleans
|
42
39
|
Given the following JSON schema:
|
@@ -52,7 +49,4 @@ Feature: Handling data types
|
|
52
49
|
}
|
53
50
|
"""
|
54
51
|
When I run the JSON data generator
|
55
|
-
Then the
|
56
|
-
"""json
|
57
|
-
{"admin":true}
|
58
|
-
"""
|
52
|
+
Then the output should match the schema
|
@@ -13,10 +13,7 @@ Feature: Generate test data
|
|
13
13
|
}
|
14
14
|
"""
|
15
15
|
When I run the JSON data generator
|
16
|
-
Then the
|
17
|
-
"""json
|
18
|
-
{"id":1}
|
19
|
-
"""
|
16
|
+
Then the output should match the schema
|
20
17
|
|
21
18
|
Scenario: Simple array
|
22
19
|
Given the following JSON schema:
|
@@ -30,7 +27,4 @@ Feature: Generate test data
|
|
30
27
|
}
|
31
28
|
"""
|
32
29
|
When I run the JSON data generator
|
33
|
-
Then the
|
34
|
-
"""json
|
35
|
-
[1]
|
36
|
-
"""
|
30
|
+
Then the output should match the schema
|
@@ -9,10 +9,7 @@ Feature: Generating empty objects
|
|
9
9
|
}
|
10
10
|
"""
|
11
11
|
When I run the JSON data generator
|
12
|
-
Then the
|
13
|
-
"""json
|
14
|
-
{}
|
15
|
-
"""
|
12
|
+
Then the output should match the schema
|
16
13
|
|
17
14
|
Scenario: Array with null
|
18
15
|
Given the following JSON schema:
|
@@ -24,10 +21,7 @@ Feature: Generating empty objects
|
|
24
21
|
}
|
25
22
|
"""
|
26
23
|
When I run the JSON data generator
|
27
|
-
Then the
|
28
|
-
"""json
|
29
|
-
[null]
|
30
|
-
"""
|
24
|
+
Then the output should match the schema
|
31
25
|
|
32
26
|
Scenario: Ruby hash
|
33
27
|
Given the following JSON schema:
|
@@ -20,10 +20,7 @@ Feature: Support nested objects and arrays
|
|
20
20
|
}
|
21
21
|
"""
|
22
22
|
When I run the JSON data generator
|
23
|
-
Then the
|
24
|
-
"""json
|
25
|
-
[{"id":1,"admin":true}]
|
26
|
-
"""
|
23
|
+
Then the output should match the schema
|
27
24
|
|
28
25
|
Scenario: Array in an object
|
29
26
|
Given the following JSON schema:
|
@@ -42,10 +39,7 @@ Feature: Support nested objects and arrays
|
|
42
39
|
}
|
43
40
|
"""
|
44
41
|
When I run the JSON data generator
|
45
|
-
Then the
|
46
|
-
"""json
|
47
|
-
{"users":[1]}
|
48
|
-
"""
|
42
|
+
Then the output should match the schema
|
49
43
|
|
50
44
|
Scenario: Array in an array
|
51
45
|
Given the following JSON schema:
|
@@ -62,10 +56,7 @@ Feature: Support nested objects and arrays
|
|
62
56
|
}
|
63
57
|
"""
|
64
58
|
When I run the JSON data generator
|
65
|
-
Then the
|
66
|
-
"""json
|
67
|
-
[[1]]
|
68
|
-
"""
|
59
|
+
Then the output should match the schema
|
69
60
|
|
70
61
|
Scenario: More complex nested object
|
71
62
|
Given the following JSON schema:
|
@@ -101,7 +92,4 @@ Feature: Support nested objects and arrays
|
|
101
92
|
}
|
102
93
|
"""
|
103
94
|
When I run the JSON data generator
|
104
|
-
Then the
|
105
|
-
"""json
|
106
|
-
[{"id":1,"dossier":{"height_in_feet":1,"favorite_foods":[1]},"admin":true}]
|
107
|
-
"""
|
95
|
+
Then the output should match the schema
|
@@ -14,10 +14,7 @@ Feature: Numeric constraints
|
|
14
14
|
}
|
15
15
|
"""
|
16
16
|
When I run the JSON data generator
|
17
|
-
Then the
|
18
|
-
"""json
|
19
|
-
{"widgets":2}
|
20
|
-
"""
|
17
|
+
Then the output should match the schema
|
21
18
|
|
22
19
|
Scenario: Number has a maximum value
|
23
20
|
Given the following JSON schema:
|
@@ -34,10 +31,7 @@ Feature: Numeric constraints
|
|
34
31
|
}
|
35
32
|
"""
|
36
33
|
When I run the JSON data generator
|
37
|
-
Then the
|
38
|
-
"""json
|
39
|
-
{"proportion":0.0}
|
40
|
-
"""
|
34
|
+
Then the output should match the schema
|
41
35
|
|
42
36
|
Scenario: Number has a minimum value
|
43
37
|
Given the following JSON schema:
|
@@ -54,10 +48,7 @@ Feature: Numeric constraints
|
|
54
48
|
}
|
55
49
|
"""
|
56
50
|
When I run the JSON data generator
|
57
|
-
Then the
|
58
|
-
"""json
|
59
|
-
{"quantity":3}
|
60
|
-
"""
|
51
|
+
Then the output should match the schema
|
61
52
|
|
62
53
|
Scenario: Maximum and minimum
|
63
54
|
Given the following JSON schema:
|
@@ -76,10 +67,7 @@ Feature: Numeric constraints
|
|
76
67
|
}
|
77
68
|
"""
|
78
69
|
When I run the JSON data generator
|
79
|
-
Then the
|
80
|
-
"""json
|
81
|
-
{"proportion":0.83}
|
82
|
-
"""
|
70
|
+
Then the output should match the schema
|
83
71
|
|
84
72
|
Scenario: Multiple with minimum
|
85
73
|
Given the following JSON schema:
|
@@ -97,7 +85,4 @@ Feature: Numeric constraints
|
|
97
85
|
}
|
98
86
|
"""
|
99
87
|
When I run the JSON data generator
|
100
|
-
Then the
|
101
|
-
"""json
|
102
|
-
{"wheels":20}
|
103
|
-
"""
|
88
|
+
Then the output should match the schema
|
@@ -8,10 +8,7 @@ Feature: Object constraints
|
|
8
8
|
}
|
9
9
|
"""
|
10
10
|
When I run the JSON data generator
|
11
|
-
Then the
|
12
|
-
"""json
|
13
|
-
{}
|
14
|
-
"""
|
11
|
+
Then the output should match the schema
|
15
12
|
|
16
13
|
Scenario: Minimum number of properties
|
17
14
|
Given the following JSON schema:
|
@@ -25,4 +22,4 @@ Feature: Object constraints
|
|
25
22
|
}
|
26
23
|
"""
|
27
24
|
When I run the JSON data generator
|
28
|
-
Then
|
25
|
+
Then the output should match the schema
|
@@ -10,8 +10,8 @@ When(/^I run the JSON data generator with the "ruby" option$/) do
|
|
10
10
|
@output = JsonTestData.generate!(@schema, ruby: true)
|
11
11
|
end
|
12
12
|
|
13
|
-
Then(/^the
|
14
|
-
expect(@output).to
|
13
|
+
Then(/^the output should match the schema$/) do
|
14
|
+
expect(@output).to match_schema(@schema)
|
15
15
|
end
|
16
16
|
|
17
17
|
Then(/^the output should be a Ruby hash$/) do
|
@@ -21,17 +21,3 @@ end
|
|
21
21
|
Then(/^the output should be a Ruby array$/) do
|
22
22
|
expect(@output).to be_a(Array)
|
23
23
|
end
|
24
|
-
|
25
|
-
Then(/^the "([^" ]*)" property of the JSON output should be a ([^ ]*)$/) do |prop, type|
|
26
|
-
klass = Class.const_get(type)
|
27
|
-
expect(JSON.parse(@output).fetch(prop).class).to eql klass
|
28
|
-
end
|
29
|
-
|
30
|
-
Then(/^the "([^"]*)" property of the JSON output should be a string of length (\d+)$/) do |prop, length|
|
31
|
-
expect(JSON.parse(@output).fetch(prop).class).to eql String
|
32
|
-
expect(JSON.parse(@output).fetch(prop).length).to eql length.to_i
|
33
|
-
end
|
34
|
-
|
35
|
-
Then(/^JSON output should have (\d+) properties$/) do |number|
|
36
|
-
expect(JSON.parse(@output).length).to eql number.to_i
|
37
|
-
end
|
@@ -14,7 +14,7 @@ Feature: String constraints
|
|
14
14
|
}
|
15
15
|
"""
|
16
16
|
When I run the JSON data generator
|
17
|
-
Then the
|
17
|
+
Then the output should match the schema
|
18
18
|
|
19
19
|
Scenario: Minimum length is long
|
20
20
|
Given the following JSON schema:
|
@@ -31,4 +31,4 @@ Feature: String constraints
|
|
31
31
|
}
|
32
32
|
"""
|
33
33
|
When I run the JSON data generator
|
34
|
-
Then the
|
34
|
+
Then the output should match the schema
|
data/features/support/env.rb
CHANGED
data/json_test_data.gemspec
CHANGED
@@ -7,20 +7,19 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.authors = ["Dana Scheider"]
|
8
8
|
s.description = "Generate test data from JSON schema"
|
9
9
|
s.summary = "json_test_data-#{s.version}"
|
10
|
-
s.email =
|
11
|
-
s.license =
|
10
|
+
s.email = "dana.scheider@gmail.com"
|
11
|
+
s.license = "MIT"
|
12
12
|
s.platform = Gem::Platform::RUBY
|
13
13
|
s.required_ruby_version = ">= 2.1.0"
|
14
14
|
|
15
|
-
s.add_dependency
|
15
|
+
s.add_dependency "regxing", "~> 0.1.0.beta"
|
16
16
|
|
17
|
-
s.add_development_dependency
|
18
|
-
s.add_development_dependency
|
19
|
-
s.add_development_dependency
|
20
|
-
s.add_development_dependency
|
21
|
-
s.add_development_dependency
|
22
|
-
s.add_development_dependency
|
23
|
-
s.add_development_dependency 'pry', '~> 0.10'
|
17
|
+
s.add_development_dependency "cucumber", "~> 2.1"
|
18
|
+
s.add_development_dependency "rspec", "~> 3.4"
|
19
|
+
s.add_development_dependency "json", "~> 1.7"
|
20
|
+
s.add_development_dependency "json-schema", "~> 2.6"
|
21
|
+
s.add_development_dependency "rake", "~> 11.0"
|
22
|
+
s.add_development_dependency "coveralls", "~> 0.7"
|
24
23
|
|
25
24
|
s.rubygems_version = ">= 1.6.1"
|
26
25
|
s.files = `git ls-files`.split("\n").reject {|path| path =~ /\.gitignore$/ }
|
@@ -12,19 +12,13 @@ module JsonTestData
|
|
12
12
|
num = new(min: minimum, max: maximum, factor: factor, type: schema.fetch(:type, "number").to_sym)
|
13
13
|
num.adjust!
|
14
14
|
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def ensure_multiple_of(number, factor=1)
|
19
|
-
number % factor == 0 ? number : number * factor
|
20
|
-
end
|
21
15
|
end
|
22
16
|
|
23
17
|
attr_accessor :value, :maximum, :minimum, :type, :factor
|
24
18
|
|
25
19
|
def initialize(min: nil, max: nil, factor: nil, value: nil, type: nil)
|
26
20
|
@factor, @minimum, @maximum = factor, min, max
|
27
|
-
@value = value || @factor ||
|
21
|
+
@value = value || @factor || rand(1000)
|
28
22
|
@type = type || :number
|
29
23
|
end
|
30
24
|
|
@@ -35,10 +29,6 @@ module JsonTestData
|
|
35
29
|
is_int? ? @step_size.to_i : @step_size.round(2)
|
36
30
|
end
|
37
31
|
|
38
|
-
def ensure_multiple_of!
|
39
|
-
@value *= factor unless value % factor == 0
|
40
|
-
end
|
41
|
-
|
42
32
|
def adjust_for_divisibility!
|
43
33
|
return if value_divisible_by_factor?
|
44
34
|
@value *= factor
|
@@ -76,7 +66,6 @@ module JsonTestData
|
|
76
66
|
end
|
77
67
|
|
78
68
|
@value ||= 1
|
79
|
-
puts "TYPE: #{type}"
|
80
69
|
@type == :number ? @value : @value.to_i
|
81
70
|
end
|
82
71
|
end
|
@@ -70,7 +70,7 @@ module JsonTestData
|
|
70
70
|
object.fetch(:minItems, nil) || object[:minItems] = 1
|
71
71
|
|
72
72
|
if object.fetch(:items, nil) && object.fetch(:items).has_key?(:type)
|
73
|
-
Array.new(object.fetch(:minItems)
|
73
|
+
Array.new(object.fetch(:minItems)).map {|item| generate(object.fetch(:items)) }
|
74
74
|
else
|
75
75
|
Array.new(object.fetch(:minItems))
|
76
76
|
end
|
@@ -73,13 +73,14 @@ describe JsonTestData::JsonSchema do
|
|
73
73
|
}.to_json
|
74
74
|
end
|
75
75
|
|
76
|
-
|
77
|
-
|
76
|
+
it "generates an object" do
|
77
|
+
output = JsonTestData::JsonSchema.new(schema).generate_example
|
78
|
+
expect(JSON.parse(output)).to be_a Hash
|
78
79
|
end
|
79
80
|
|
80
|
-
it "
|
81
|
-
|
82
|
-
expect(
|
81
|
+
it "contains the right type of objects" do
|
82
|
+
output = JsonTestData::JsonSchema.new(schema).generate_example
|
83
|
+
expect(JSON.parse(output).fetch("name")).to be_a(Numeric)
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
@@ -94,13 +95,15 @@ describe JsonTestData::JsonSchema do
|
|
94
95
|
}.to_json
|
95
96
|
end
|
96
97
|
|
97
|
-
|
98
|
-
|
98
|
+
it "generates an array" do
|
99
|
+
json_schema = JsonTestData::JsonSchema.new(schema)
|
100
|
+
expect(JSON.parse(json_schema.generate_example)).to be_a Array
|
99
101
|
end
|
100
102
|
|
101
|
-
it "
|
102
|
-
|
103
|
-
|
103
|
+
it "contains the right kind of objects" do
|
104
|
+
array = JSON.parse(JsonTestData::JsonSchema.new(schema).generate_example)
|
105
|
+
all_numbers = array.all? {|item| item.is_a?(Numeric) }
|
106
|
+
expect(all_numbers).to be true
|
104
107
|
end
|
105
108
|
end
|
106
109
|
end
|
@@ -120,13 +123,9 @@ describe JsonTestData::JsonSchema do
|
|
120
123
|
}.to_json
|
121
124
|
end
|
122
125
|
|
123
|
-
let(:output) do
|
124
|
-
{:id => 1}.to_json
|
125
|
-
end
|
126
|
-
|
127
126
|
it "uses the correct data type" do
|
128
|
-
|
129
|
-
expect(
|
127
|
+
example = JsonTestData::JsonSchema.new(schema).generate_example
|
128
|
+
expect(JSON.parse(example).fetch("id")).to be_a Numeric
|
130
129
|
end
|
131
130
|
end
|
132
131
|
|
@@ -170,13 +169,13 @@ describe JsonTestData::JsonSchema do
|
|
170
169
|
}.to_json
|
171
170
|
end
|
172
171
|
|
173
|
-
let(:output) do
|
174
|
-
[{:id => 1}].to_json
|
175
|
-
end
|
176
|
-
|
177
172
|
it "nests the object" do
|
178
|
-
|
179
|
-
|
173
|
+
example = JSON.parse(JsonTestData::JsonSchema.new(schema).generate_example)
|
174
|
+
aggregate_failures do
|
175
|
+
expect(example).to be_a Array
|
176
|
+
expect(example.first).to be_a Hash
|
177
|
+
expect(example.first.fetch("id")).to be_a Numeric
|
178
|
+
end
|
180
179
|
end
|
181
180
|
end
|
182
181
|
|
@@ -201,8 +200,12 @@ describe JsonTestData::JsonSchema do
|
|
201
200
|
end
|
202
201
|
|
203
202
|
it "nests the object" do
|
204
|
-
|
205
|
-
|
203
|
+
example = JSON.parse(JsonTestData::JsonSchema.new(schema).generate_example)
|
204
|
+
aggregate_failures do
|
205
|
+
expect(example).to be_a Hash
|
206
|
+
expect(example.fetch("users")).to be_a Array
|
207
|
+
expect(example.fetch("users").first).to be_a Numeric
|
208
|
+
end
|
206
209
|
end
|
207
210
|
end
|
208
211
|
|
@@ -220,13 +223,13 @@ describe JsonTestData::JsonSchema do
|
|
220
223
|
}.to_json
|
221
224
|
end
|
222
225
|
|
223
|
-
let(:output) do
|
224
|
-
[[1]].to_json
|
225
|
-
end
|
226
|
-
|
227
226
|
it "returns a nested array" do
|
228
|
-
|
229
|
-
|
227
|
+
example = JSON.parse(JsonTestData::JsonSchema.new(schema).generate_example)
|
228
|
+
aggregate_failures do
|
229
|
+
expect(example).to be_a Array
|
230
|
+
expect(example.first).to be_a Array
|
231
|
+
expect(example.first.first).to be_a Numeric
|
232
|
+
end
|
230
233
|
end
|
231
234
|
end
|
232
235
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,13 +2,12 @@ require "coveralls"
|
|
2
2
|
|
3
3
|
Coveralls.wear!
|
4
4
|
|
5
|
-
require "pry"
|
6
|
-
|
7
5
|
require_relative "../lib/json_test_data"
|
8
6
|
require_relative "../lib/json_test_data/json_schema"
|
9
7
|
require_relative "../lib/json_test_data/data_structures/string"
|
10
8
|
require_relative "../lib/json_test_data/data_structures/number"
|
11
9
|
require_relative "./matchers/number_matchers"
|
10
|
+
require_relative "./matchers/json_schema_matchers"
|
12
11
|
|
13
12
|
RSpec.configure do |config|
|
14
13
|
config.expect_with :rspec do |expectations|
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_test_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Scheider
|
@@ -67,33 +67,33 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: json-schema
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.6'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
89
|
+
version: '11.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0
|
96
|
+
version: '11.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: coveralls
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.7'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0.10'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0.10'
|
125
111
|
description: Generate test data from JSON schema
|
126
112
|
email: dana.scheider@gmail.com
|
127
113
|
executables: []
|
@@ -157,6 +143,7 @@ files:
|
|
157
143
|
- spec/json_test_data/data_structures/number_spec.rb
|
158
144
|
- spec/json_test_data/data_structures/string_spec.rb
|
159
145
|
- spec/json_test_data/json_schema_spec.rb
|
146
|
+
- spec/matchers/json_schema_matchers.rb
|
160
147
|
- spec/matchers/number_matchers.rb
|
161
148
|
- spec/spec_helper.rb
|
162
149
|
- version.rb
|
@@ -184,7 +171,7 @@ rubyforge_project:
|
|
184
171
|
rubygems_version: 2.5.1
|
185
172
|
signing_key:
|
186
173
|
specification_version: 4
|
187
|
-
summary: json_test_data-0.
|
174
|
+
summary: json_test_data-0.7.0
|
188
175
|
test_files:
|
189
176
|
- features/array_constraints.feature
|
190
177
|
- features/data_types.feature
|
@@ -200,5 +187,6 @@ test_files:
|
|
200
187
|
- spec/json_test_data/data_structures/number_spec.rb
|
201
188
|
- spec/json_test_data/data_structures/string_spec.rb
|
202
189
|
- spec/json_test_data/json_schema_spec.rb
|
190
|
+
- spec/matchers/json_schema_matchers.rb
|
203
191
|
- spec/matchers/number_matchers.rb
|
204
192
|
- spec/spec_helper.rb
|