hypothesis-specs 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/hypothesis.rb +1 -1
- data/lib/hypothesis/possible.rb +7 -6
- data/src/lib.rs +1 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2eece2e1eb0f43151ca4931de4b6a1875d30e4bb6817b12ecdfd6a616389e99
|
4
|
+
data.tar.gz: ad4e0f15f8114ea29f6aaf1651086f94869cab21180c71f5306ae7ddf1e1a54f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b61924af6ab1675ada437e51080033b41cdca3a6f229e4216e72afcece9b809ac9a8ddfe6bf9e5103f6ed968970ca46124df82930e126e6280bc0b83304f5fe2
|
7
|
+
data.tar.gz: 0da05cda97c2cb11b825daf3183b987c3f48c999013b243f06516116deaaf99d8e8c4c79775d7671434a2af3a4a84dca75cd7cd9215317b83d3523dcc677aecf
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# Hypothesis for Ruby 0.1.1 (2018-08-31)
|
2
|
+
|
3
|
+
This release fixes minor documentation issues.
|
4
|
+
|
5
|
+
Thanks to Tessa Bradbury for this contribution.
|
6
|
+
|
1
7
|
# Hypothesis for Ruby 0.1.0 (2018-07-16)
|
2
8
|
|
3
9
|
This release adds support for reporting multiple exceptions when Hypothesis
|
data/lib/hypothesis.rb
CHANGED
@@ -122,7 +122,7 @@ module Hypothesis
|
|
122
122
|
# of the block is a *test case*.
|
123
123
|
# A test case has three important features:
|
124
124
|
#
|
125
|
-
# * *givens* are the result of a call to self.
|
125
|
+
# * *givens* are the result of a call to self.any, and are the
|
126
126
|
# values that make up the test case. These might be values such
|
127
127
|
# as strings, integers, etc. or they might be values specific to
|
128
128
|
# your application such as a User object.
|
data/lib/hypothesis/possible.rb
CHANGED
@@ -111,7 +111,7 @@ module Hypothesis
|
|
111
111
|
# two names: A singular and a plural name. These are
|
112
112
|
# simply aliases and are identical in every way, but are
|
113
113
|
# provided to improve readability. For example
|
114
|
-
# `any integer` reads better than `
|
114
|
+
# `any integer` reads better than `any integers`
|
115
115
|
# but `arrays(of: integers)` reads better than
|
116
116
|
# `arrays(of: integer)`.
|
117
117
|
module Possibilities
|
@@ -124,7 +124,7 @@ module Hypothesis
|
|
124
124
|
# built_as lets you chain multiple Possible values together,
|
125
125
|
# by providing whatever value results from its block.
|
126
126
|
#
|
127
|
-
# For example the following provides
|
127
|
+
# For example the following provides an array plus some
|
128
128
|
# element from that array:
|
129
129
|
#
|
130
130
|
# ```ruby
|
@@ -135,6 +135,7 @@ module Hypothesis
|
|
135
135
|
# assume ls.size > 0
|
136
136
|
# i = any element_of(ls)
|
137
137
|
# [ls, i]
|
138
|
+
# end
|
138
139
|
# ```
|
139
140
|
#
|
140
141
|
# @return [Possible] A Possible whose possible values are
|
@@ -177,7 +178,7 @@ module Hypothesis
|
|
177
178
|
# valid.
|
178
179
|
# @param min_size [Integer] The smallest valid length for a
|
179
180
|
# provided string
|
180
|
-
# @param max_size [Integer] The
|
181
|
+
# @param max_size [Integer] The largest valid length for a
|
181
182
|
# provided string
|
182
183
|
def strings(codepoints: nil, min_size: 0, max_size: 10)
|
183
184
|
codepoints = self.codepoints if codepoints.nil?
|
@@ -263,9 +264,9 @@ module Hypothesis
|
|
263
264
|
alias array_of_shape arrays_of_shape
|
264
265
|
|
265
266
|
# A Possible Array of variable shape.
|
266
|
-
# This is used for arrays where
|
267
|
-
#
|
268
|
-
# For example, arrays(booleans) might provide [false, true, false].
|
267
|
+
# This is used for arrays where the size may vary and the same values
|
268
|
+
# are possible at any position.
|
269
|
+
# For example, arrays(of: booleans) might provide [false, true, false].
|
269
270
|
# @return [Possible]
|
270
271
|
# @param of [Possible] The possible elements of the array.
|
271
272
|
# @param min_size [Integer] The smallest valid size of a provided array
|
data/src/lib.rs
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
// "Bridging" root code that exists exclusively to provide
|
2
|
-
// a ruby -> Hypothesis engine binding.
|
3
|
-
// in here is the only code that is going to stay in this
|
4
|
-
// crate, and everything else is going to get factored out
|
5
|
-
// into its own.
|
2
|
+
// a ruby -> Hypothesis engine binding.
|
6
3
|
|
7
4
|
#![recursion_limit = "256"]
|
8
5
|
#![deny(warnings, missing_debug_implementations)]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hypothesis-specs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David R. Maciver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: helix_runtime
|