rspice 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspice.rb +1 -0
- data/lib/rspice/custom_matchers/have_error_on_attribute.rb +3 -3
- data/lib/rspice/version.rb +1 -1
- 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: 6fa3fc0a06f54c841ff4749e205df15b8f63b837c63c6b89d962e8115b8186b1
|
4
|
+
data.tar.gz: 54fc61701af43f053585307ae0af8ccf6163ca8a0ae75383891a06117ad89038
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7959f0c8300a1a69749ba8622dcf8d50296acf5591b695c3f4caf2983c3ab672fcb6b4e76b0eb88d089abae2cf07d6a599fe0288d5b33ff47923da86a4324a7f
|
7
|
+
data.tar.gz: 6515c9d603be115e64c51bf65bd39f8819e253b46b9a97ddded0ad9c55ecf61a4e4e38dbdc73fee8914e2f5c2a442b8fc5265203406cb7f64973c36c26a02156
|
data/lib/rspice.rb
CHANGED
@@ -23,9 +23,9 @@ RSpec::Matchers.define :have_error_on_attribute do |attribute|
|
|
23
23
|
match do |record|
|
24
24
|
raise ArgumentError, "have_error_on_attribute matcher requires a detail_key" if @detail_key.blank?
|
25
25
|
|
26
|
-
errors = (record.errors.details[attribute.to_sym] || []).pluck(:error)
|
26
|
+
@errors = (record.errors.details[attribute.to_sym] || []).pluck(:error).map(&:to_sym)
|
27
27
|
|
28
|
-
expect(errors).to include(@detail_key)
|
28
|
+
expect(@errors).to include(@detail_key.to_sym)
|
29
29
|
end
|
30
30
|
|
31
31
|
chain :with_detail_key do |detail_key|
|
@@ -37,7 +37,7 @@ RSpec::Matchers.define :have_error_on_attribute do |attribute|
|
|
37
37
|
end
|
38
38
|
|
39
39
|
failure_message do |record|
|
40
|
-
"expected #{record} to have error on attribute #{attribute} with detail key #{@detail_key.inspect}"
|
40
|
+
"expected #{record} to have error on attribute #{attribute} with detail key #{@detail_key.inspect}, got #{@errors}"
|
41
41
|
end
|
42
42
|
|
43
43
|
failure_message_when_negated do |record|
|
data/lib/rspice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|