rspec-be_valid_when_matcher 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/README.md +3 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daaf9a8e2a9e2980705757223f7074e1e809b339
|
4
|
+
data.tar.gz: 9a0de5b1ca937079b3b30f0597e470de8c2a6b78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85fa1f8a87ec1afcc5049621596db2f3855861a45a92a3f7553fea2405746d7c40780fbfa85e255af71a6044c1ed9084bf506b692e2dcf89e2be06a8d9465243
|
7
|
+
data.tar.gz: dcffd949fdd5edd0ba4a19902e254102cc0cccb4840e62d32ce6f98add4fd8ab7d2b8fd1a37cfed369e6119f82da2fb53d593270343cdcdc894c834c5009f9fe
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# rspec-be_valid_when_matcher
|
2
2
|
|
3
|
+
[]
|
4
|
+
(http://badge.fury.io/rb/rspec-be_valid_when_matcher)
|
5
|
+
|
3
6
|
RSpec matcher for testing ActiveRecord models with a fluent and clear language.
|
4
7
|
|
5
8
|
## Install
|
@@ -87,15 +90,6 @@ Test field validity with specific type values:
|
|
87
90
|
be_valid_when(:field).is_number 2 # Defaults to 42
|
88
91
|
be_valid_when(:field).is_fixnum 2 # Defaults to 42
|
89
92
|
be_valid_when(:field).is_bignum 1024**32 # Defaults to 42**13
|
90
|
-
be_valid_when(:field).is_float 0.1 # Defaults to 3.14
|
91
|
-
be_valid_when(:field).is_complex 2.to_c # Defaults to 42+0i
|
92
|
-
be_valid_when(:field).is_rational 2.to_r # Defaults to 42/1
|
93
|
-
be_valid_when(:field).is_bigdecimal BigDecimal('2') # Defaults to BigDecimal('42')
|
94
|
-
be_valid_when(:field).is_string 'a' # Defaults to 'value'
|
95
|
-
be_valid_when(:field).is_regex /abc/ # Defaults to /^value$/
|
96
|
-
be_valid_when(:field).is_array [1,2] # Defaults to [42]
|
97
|
-
be_valid_when(:field).is_hash { a: 1 } # Defaults to { value: 42 }
|
98
|
-
be_valid_when(:field).is_symbol :a # Defaults to :value
|
99
93
|
```
|
100
94
|
|
101
95
|
## MIT Licensed
|