defra_ruby_validators 1.2.1 → 2.0.0

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: b1607394697eb8982eaa80e5c06f92070092e683
4
- data.tar.gz: b009d70231ecf73dc50b836111930bd925b2f9bc
3
+ metadata.gz: 9e5ed7ab23b268eefae3ca4562474af6d9d99256
4
+ data.tar.gz: 321d765b25fa232e3c3c15e472758c926479b9b3
5
5
  SHA512:
6
- metadata.gz: 3b61b38bdbd8aee48f1f2296811002ee211db164fb9d2756622a6413d84f4f8aeb56ccdd4c5af3ccb12a21ef177d5fa7d3b8a253b0865e5c530fb601d0d3ceed
7
- data.tar.gz: ecb29f5897c9d3772f0c44e6e90025948647f637c402cd81d5e2527c691b69e77ea77ede7dc17762d4b97bc653fbb460a1a059347cc5e8c1b8cb0fd465c3306a
6
+ metadata.gz: 16130d992e38be4c21743b377071aef456bf96b8d5408d243cd5089139849f7d7b0d0122656d9832918b22ac0a42a857c26be7f1fbe21d6f7eb865c06138c955
7
+ data.tar.gz: 1ec1f377278b8e598b7885499a2a9e876173672416bce799f30707ba441e18a76b8e48377314eda1b4f3bf65f7d45e276e0642f95caf30679e8cf4a4637a458e
@@ -4,7 +4,7 @@ en:
4
4
  CompaniesHouseNumberValidator:
5
5
  company_no:
6
6
  blank: Enter a company registration number
7
- invalid: "Enter a valid number - it should have 8 digits, or 2 letters followed by 6 digits, or 2 letters followed by 5 digits and another letter. If your number has only 7 digits, enter it with a zero at the start."
7
+ invalid_format: "Enter a valid number - it should have 8 digits, or 2 letters followed by 6 digits, or 2 letters followed by 5 digits and another letter. If your number has only 7 digits, enter it with a zero at the start."
8
8
  not_found: Companies House couldn't find a company with this number
9
9
  inactive: Your company must be registered as an active company
10
10
  error: There was an error connecting with Companies House. Hopefully this is a one off and will work if you try again.
@@ -4,5 +4,5 @@ en:
4
4
  GridReferenceValidator:
5
5
  grid_reference:
6
6
  blank: Enter a grid reference
7
- wrong_format: The grid reference should have 2 letters and 10 digits
7
+ invalid_format: The grid reference should have 2 letters and 10 digits
8
8
  invalid: The grid reference is not a valid coordinate
@@ -3,5 +3,5 @@ en:
3
3
  validators:
4
4
  PositionValidator:
5
5
  position:
6
- invalid: "The position must contain only letters, spaces, commas, full stops, hyphens and apostrophes"
6
+ invalid_format: "The position must contain only letters, spaces, commas, full stops, hyphens and apostrophes"
7
7
  too_long: "The position must have no more than 70 characters"
@@ -7,7 +7,11 @@ module DefraRuby
7
7
  protected
8
8
 
9
9
  def error_message(attribute, error)
10
- options[:message] || I18n.t("defra_ruby.validators.#{class_name}.#{attribute}.#{error}")
10
+ if options[:messages] && options[:messages][error]
11
+ options[:messages][error]
12
+ else
13
+ I18n.t("defra_ruby.validators.#{class_name}.#{attribute}.#{error}")
14
+ end
11
15
  end
12
16
 
13
17
  private
@@ -32,7 +32,7 @@ module DefraRuby
32
32
  def format_is_valid?(record, attribute, value)
33
33
  return true if value.match?(VALID_COMPANIES_HOUSE_REGISTRATION_NUMBER_REGEX)
34
34
 
35
- record.errors[attribute] << error_message(:company_no, :invalid)
35
+ record.errors[attribute] << error_message(:company_no, :invalid_format)
36
36
  false
37
37
  end
38
38
 
@@ -10,7 +10,7 @@ module DefraRuby
10
10
  # Name fields must contain only letters, spaces, commas, full stops, hyphens and apostrophes
11
11
  return true if value.match?(/\A[-a-z\s,.']+\z/i)
12
12
 
13
- record.errors[attribute] << error_message(attribute, :invalid)
13
+ record.errors[attribute] << error_message(attribute, :invalid_format)
14
14
  false
15
15
  end
16
16
 
@@ -22,7 +22,7 @@ module DefraRuby
22
22
  def valid_format?(record, attribute, value)
23
23
  return true if value.match?(/\A#{grid_reference_pattern}\z/)
24
24
 
25
- record.errors[attribute] << error_message(:grid_reference, :wrong_format)
25
+ record.errors[attribute] << error_message(:grid_reference, :invalid_format)
26
26
  false
27
27
  end
28
28
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DefraRuby
4
4
  module Validators
5
- VERSION = "1.2.1"
5
+ VERSION = "2.0.0"
6
6
  end
7
7
  end
@@ -43,7 +43,11 @@ module DefraRuby
43
43
  :blank
44
44
  )
45
45
 
46
- it_behaves_like "an invalid record", validatable, :company_no, error_message
46
+ it_behaves_like "an invalid record",
47
+ validatable: validatable,
48
+ attribute: :company_no,
49
+ error: :blank,
50
+ error_message: error_message
47
51
  end
48
52
 
49
53
  context "because the format is wrong" do
@@ -51,10 +55,14 @@ module DefraRuby
51
55
  error_message = Helpers::Translator.error_message(
52
56
  CompaniesHouseNumberValidator,
53
57
  :company_no,
54
- :invalid
58
+ :invalid_format
55
59
  )
56
60
 
57
- it_behaves_like "an invalid record", validatable, :company_no, error_message
61
+ it_behaves_like "an invalid record",
62
+ validatable: validatable,
63
+ attribute: :company_no,
64
+ error: :invalid_format,
65
+ error_message: error_message
58
66
  end
59
67
 
60
68
  context "because it's not found on companies house" do
@@ -69,7 +77,11 @@ module DefraRuby
69
77
  :not_found
70
78
  )
71
79
 
72
- it_behaves_like "an invalid record", validatable, :company_no, error_message
80
+ it_behaves_like "an invalid record",
81
+ validatable: validatable,
82
+ attribute: :company_no,
83
+ error: :not_found,
84
+ error_message: error_message
73
85
  end
74
86
 
75
87
  context "because it's not 'active' on companies house" do
@@ -84,7 +96,11 @@ module DefraRuby
84
96
  :inactive
85
97
  )
86
98
 
87
- it_behaves_like "an invalid record", validatable, :company_no, error_message
99
+ it_behaves_like "an invalid record",
100
+ validatable: validatable,
101
+ attribute: :company_no,
102
+ error: :inactive,
103
+ error_message: error_message
88
104
  end
89
105
  end
90
106
 
@@ -100,7 +116,11 @@ module DefraRuby
100
116
  :error
101
117
  )
102
118
 
103
- it_behaves_like "an invalid record", validatable, :company_no, error_message
119
+ it_behaves_like "an invalid record",
120
+ validatable: validatable,
121
+ attribute: :company_no,
122
+ error: :error,
123
+ error_message: error_message
104
124
  end
105
125
  end
106
126
  end
@@ -33,7 +33,11 @@ module DefraRuby
33
33
 
34
34
  error_message = Helpers::Translator.error_message(EmailValidator, :email, :invalid_format)
35
35
 
36
- it_behaves_like "an invalid record", validatable, :email, error_message
36
+ it_behaves_like "an invalid record",
37
+ validatable: validatable,
38
+ attribute: :email,
39
+ error: :invalid_format,
40
+ error_message: error_message
37
41
  end
38
42
  end
39
43
  end
@@ -31,16 +31,24 @@ module DefraRuby
31
31
  context "when the grid reference is not valid" do
32
32
  context "because the grid reference is not correctly formatted" do
33
33
  validatable = Test::GridReferenceValidatable.new(invalid_grid_reference)
34
- error_message = Helpers::Translator.error_message(GridReferenceValidator, :grid_reference, :wrong_format)
34
+ error_message = Helpers::Translator.error_message(GridReferenceValidator, :grid_reference, :invalid_format)
35
35
 
36
- it_behaves_like "an invalid record", validatable, :grid_reference, error_message
36
+ it_behaves_like "an invalid record",
37
+ validatable: validatable,
38
+ attribute: :grid_reference,
39
+ error: :invalid_format,
40
+ error_message: error_message
37
41
  end
38
42
 
39
43
  context "because the grid reference is not a coordinate" do
40
44
  validatable = Test::GridReferenceValidatable.new(non_coordinate_grid_reference)
41
45
  error_message = Helpers::Translator.error_message(GridReferenceValidator, :grid_reference, :invalid)
42
46
 
43
- it_behaves_like "an invalid record", validatable, :grid_reference, error_message
47
+ it_behaves_like "an invalid record",
48
+ validatable: validatable,
49
+ attribute: :grid_reference,
50
+ error: :invalid,
51
+ error_message: error_message
44
52
  end
45
53
  end
46
54
  end
@@ -46,7 +46,11 @@ module DefraRuby
46
46
  validatable = Test::PhoneNumberValidatable.new(invalid_number)
47
47
  error_message = Helpers::Translator.error_message(PhoneNumberValidator, :phone_number, :invalid_format)
48
48
 
49
- it_behaves_like "an invalid record", validatable, :phone_number, error_message
49
+ it_behaves_like "an invalid record",
50
+ validatable: validatable,
51
+ attribute: :phone_number,
52
+ error: :invalid_format,
53
+ error_message: error_message
50
54
  end
51
55
  end
52
56
  end
@@ -32,7 +32,11 @@ module DefraRuby
32
32
  validatable = Test::TokenValidatable.new(invalid_token)
33
33
  error_message = Helpers::Translator.error_message(TokenValidator, :token, :invalid_format)
34
34
 
35
- it_behaves_like "an invalid record", validatable, :token, error_message
35
+ it_behaves_like "an invalid record",
36
+ validatable: validatable,
37
+ attribute: :token,
38
+ error: :invalid_format,
39
+ error_message: error_message
36
40
  end
37
41
  end
38
42
  end
data/spec/examples.txt CHANGED
@@ -1,153 +1,153 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------------------------------------------------------ | ------ | --------------- |
3
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
4
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
3
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
4
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.00013 seconds |
5
5
  ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00026 seconds |
6
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.0002 seconds |
7
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00026 seconds |
8
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00018 seconds |
9
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00028 seconds |
10
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00099 seconds |
6
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
7
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00021 seconds |
8
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00028 seconds |
9
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00018 seconds |
10
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.0009 seconds |
11
11
  ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00023 seconds |
12
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00056 seconds |
13
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00027 seconds |
14
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00072 seconds |
15
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
16
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00155 seconds |
17
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00066 seconds |
18
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00065 seconds |
19
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.00055 seconds |
20
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.0005 seconds |
21
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.00063 seconds |
22
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00066 seconds |
23
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00062 seconds |
24
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00022 seconds |
25
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
26
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.00018 seconds |
27
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:4:1] | passed | 0.00054 seconds |
28
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.00018 seconds |
29
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00014 seconds |
12
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00018 seconds |
13
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00021 seconds |
14
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00082 seconds |
15
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
16
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00058 seconds |
17
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00046 seconds |
18
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00036 seconds |
19
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.0004 seconds |
20
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.00038 seconds |
21
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.00037 seconds |
22
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00039 seconds |
23
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00041 seconds |
24
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.0003 seconds |
25
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00026 seconds |
26
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.00037 seconds |
27
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:4:1] | passed | 0.00125 seconds |
28
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.00033 seconds |
29
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00017 seconds |
30
30
  ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:3] | passed | 0.00016 seconds |
31
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:4:1] | passed | 0.00104 seconds |
32
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.00053 seconds |
33
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00054 seconds |
34
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00067 seconds |
35
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:4:1] | passed | 0.00083 seconds |
36
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00048 seconds |
37
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.00047 seconds |
38
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00043 seconds |
39
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:4:1] | passed | 0.00073 seconds |
40
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00086 seconds |
41
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00048 seconds |
42
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.001 seconds |
43
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:4:1] | passed | 0.00079 seconds |
44
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.02746 seconds |
45
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.0166 seconds |
46
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.01613 seconds |
47
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.01377 seconds |
48
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.0128 seconds |
49
- ./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.00445 seconds |
50
- ./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.00013 seconds |
51
- ./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.00023 seconds |
52
- ./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00037 seconds |
53
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:1:1] | passed | 0.00008 seconds |
54
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
55
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00018 seconds |
56
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00028 seconds |
57
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00018 seconds |
58
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00013 seconds |
59
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00018 seconds |
60
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00103 seconds |
61
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00026 seconds |
62
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00037 seconds |
63
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00024 seconds |
64
- ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00068 seconds |
65
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:1:1] | passed | 0.00014 seconds |
66
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:1] | passed | 0.00024 seconds |
67
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00032 seconds |
68
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00309 seconds |
69
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00032 seconds |
70
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00016 seconds |
71
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00021 seconds |
72
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00088 seconds |
73
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00026 seconds |
74
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00053 seconds |
75
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00028 seconds |
76
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.0011 seconds |
77
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:1] | passed | 0.0005 seconds |
78
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:2] | passed | 0.00048 seconds |
79
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:3] | passed | 0.00059 seconds |
80
- ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:4:1] | passed | 0.00457 seconds |
81
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:1:1] | passed | 0.00021 seconds |
82
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:1] | passed | 0.00011 seconds |
83
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00021 seconds |
84
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
85
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00251 seconds |
86
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00019 seconds |
87
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00027 seconds |
88
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00117 seconds |
89
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00028 seconds |
31
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:4:1] | passed | 0.00066 seconds |
32
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.00044 seconds |
33
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00049 seconds |
34
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00048 seconds |
35
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:4:1] | passed | 0.00402 seconds |
36
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00044 seconds |
37
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.00043 seconds |
38
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00058 seconds |
39
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:4:1] | passed | 0.00127 seconds |
40
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00055 seconds |
41
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00042 seconds |
42
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.00045 seconds |
43
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:4:1] | passed | 0.00075 seconds |
44
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.01444 seconds |
45
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.0157 seconds |
46
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.02689 seconds |
47
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.0165 seconds |
48
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.01395 seconds |
49
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.00453 seconds |
50
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.00023 seconds |
51
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.00014 seconds |
52
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00018 seconds |
53
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
54
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
55
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00048 seconds |
56
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00037 seconds |
57
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.0002 seconds |
58
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00028 seconds |
59
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00042 seconds |
60
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00106 seconds |
61
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00067 seconds |
62
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00027 seconds |
63
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00057 seconds |
64
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00147 seconds |
65
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:1:1] | passed | 0.00012 seconds |
66
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:1] | passed | 0.00027 seconds |
67
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00084 seconds |
68
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00066 seconds |
69
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00057 seconds |
70
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00018 seconds |
71
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00039 seconds |
72
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00146 seconds |
73
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00023 seconds |
74
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00023 seconds |
75
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00022 seconds |
76
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00107 seconds |
77
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:1] | passed | 0.00031 seconds |
78
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:2] | passed | 0.00038 seconds |
79
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:3] | passed | 0.00045 seconds |
80
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:4:1] | passed | 0.00095 seconds |
81
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
82
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:1] | passed | 0.00009 seconds |
83
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00025 seconds |
84
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00018 seconds |
85
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00036 seconds |
86
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00021 seconds |
87
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00034 seconds |
88
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00086 seconds |
89
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00023 seconds |
90
90
  ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00025 seconds |
91
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00032 seconds |
92
- ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.0011 seconds |
93
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:1:1] | passed | 0.00014 seconds |
94
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:1] | passed | 0.00017 seconds |
95
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00299 seconds |
96
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00085 seconds |
97
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.0004 seconds |
98
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00045 seconds |
99
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00024 seconds |
100
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00113 seconds |
91
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00029 seconds |
92
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00086 seconds |
93
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
94
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
95
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.02613 seconds |
96
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.0006 seconds |
97
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00024 seconds |
98
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00029 seconds |
99
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00034 seconds |
100
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00092 seconds |
101
101
  ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:1] | passed | 0.00011 seconds |
102
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:1] | passed | 0.01332 seconds |
103
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:2] | passed | 0.0004 seconds |
104
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00021 seconds |
105
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00025 seconds |
106
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00021 seconds |
107
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00076 seconds |
108
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00815 seconds |
109
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00024 seconds |
110
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:3] | passed | 0.00029 seconds |
111
- ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:4:1] | passed | 0.00077 seconds |
112
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.00008 seconds |
113
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.00008 seconds |
114
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.0001 seconds |
115
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00021 seconds |
116
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00016 seconds |
102
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00052 seconds |
103
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00031 seconds |
104
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00043 seconds |
105
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00021 seconds |
106
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00019 seconds |
107
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00119 seconds |
108
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00049 seconds |
109
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:2] | passed | 0.0002 seconds |
110
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:3] | passed | 0.0002 seconds |
111
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:4:1] | passed | 0.00136 seconds |
112
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.00021 seconds |
113
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.00179 seconds |
114
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00021 seconds |
115
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.01084 seconds |
116
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00038 seconds |
117
117
  ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00025 seconds |
118
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00014 seconds |
119
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00055 seconds |
120
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00008 seconds |
121
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.0001 seconds |
122
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00014 seconds |
123
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00021 seconds |
124
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.0002 seconds |
125
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.0002 seconds |
126
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00054 seconds |
127
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00036 seconds |
128
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00018 seconds |
129
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.00018 seconds |
130
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.00018 seconds |
131
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00023 seconds |
132
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00044 seconds |
133
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00025 seconds |
134
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00364 seconds |
135
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00031 seconds |
136
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00152 seconds |
137
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00024 seconds |
138
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00016 seconds |
139
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00024 seconds |
140
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00064 seconds |
141
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.00141 seconds |
142
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.00013 seconds |
143
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00011 seconds |
144
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00018 seconds |
145
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00031 seconds |
146
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00029 seconds |
147
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00022 seconds |
148
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00091 seconds |
149
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.03095 seconds |
150
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00026 seconds |
151
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00153 seconds |
152
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.01248 seconds |
153
- ./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.00432 seconds |
118
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00094 seconds |
119
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.01231 seconds |
120
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00011 seconds |
121
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00016 seconds |
122
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00013 seconds |
123
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.0003 seconds |
124
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00026 seconds |
125
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00027 seconds |
126
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.0012 seconds |
127
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00014 seconds |
128
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00019 seconds |
129
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.00014 seconds |
130
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
131
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00015 seconds |
132
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
133
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00024 seconds |
134
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00015 seconds |
135
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.0002 seconds |
136
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.0008 seconds |
137
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00022 seconds |
138
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00027 seconds |
139
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00023 seconds |
140
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00072 seconds |
141
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
142
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.00012 seconds |
143
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00014 seconds |
144
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00016 seconds |
145
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00019 seconds |
146
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00017 seconds |
147
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00046 seconds |
148
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00112 seconds |
149
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.0002 seconds |
150
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00018 seconds |
151
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.0004 seconds |
152
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00085 seconds |
153
+ ./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.00228 seconds |
@@ -16,9 +16,13 @@ RSpec.shared_examples "a characters validator" do |validator, validatable_class,
16
16
  context "when the #{attribute} is not valid" do
17
17
  context "because the #{attribute} is not correctly formatted" do
18
18
  validatable = validatable_class.new(values[:invalid])
19
- error_message = Helpers::Translator.error_message(validator, attribute, :invalid)
19
+ error_message = Helpers::Translator.error_message(validator, attribute, :invalid_format)
20
20
 
21
- it_behaves_like "an invalid record", validatable, attribute, error_message
21
+ it_behaves_like "an invalid record",
22
+ validatable: validatable,
23
+ attribute: attribute,
24
+ error: :invalid_format,
25
+ error_message: error_message
22
26
  end
23
27
  end
24
28
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.shared_examples "an invalid record" do |validatable, attribute, error_message|
3
+ RSpec.shared_examples "an invalid record" do |validatable:, attribute:, error:, error_message:|
4
4
  it "confirms the object is invalid" do
5
5
  expect(validatable).to_not be_valid
6
6
  end
@@ -16,9 +16,10 @@ RSpec.shared_examples "an invalid record" do |validatable, attribute, error_mess
16
16
  expect(validatable.errors[attribute]).to eq([error_message])
17
17
  end
18
18
 
19
- context "when there is a custom error message" do
19
+ context "when there are custom error messages" do
20
20
  let(:custom_message) { "something is wrong (in a customised way)" }
21
- before { allow_any_instance_of(DefraRuby::Validators::BaseValidator).to receive(:options).and_return(message: custom_message) }
21
+ let(:messages) { { error => custom_message } }
22
+ before { allow_any_instance_of(DefraRuby::Validators::BaseValidator).to receive(:options).and_return(messages: messages) }
22
23
 
23
24
  it "uses the custom message instead of the default" do
24
25
  validatable.valid?
@@ -18,7 +18,11 @@ RSpec.shared_examples "a length validator" do |validator, validatable_class, att
18
18
  validatable = validatable_class.new(values[:invalid])
19
19
  error_message = Helpers::Translator.error_message(validator, attribute, :too_long)
20
20
 
21
- it_behaves_like "an invalid record", validatable, attribute, error_message
21
+ it_behaves_like "an invalid record",
22
+ validatable: validatable,
23
+ attribute: attribute,
24
+ error: :too_long,
25
+ error_message: error_message
22
26
  end
23
27
  end
24
28
  end
@@ -18,7 +18,11 @@ RSpec.shared_examples "a presence validator" do |validator, validatable_class, a
18
18
  validatable = validatable_class.new
19
19
  error_message = Helpers::Translator.error_message(validator, attribute, :blank)
20
20
 
21
- it_behaves_like "an invalid record", validatable, attribute, error_message
21
+ it_behaves_like "an invalid record",
22
+ validatable: validatable,
23
+ attribute: attribute,
24
+ error: :blank,
25
+ error_message: error_message
22
26
  end
23
27
  end
24
28
  end
@@ -18,14 +18,22 @@ RSpec.shared_examples "a selection validator" do |validator, validatable_class,
18
18
  validatable = validatable_class.new
19
19
  error_message = Helpers::Translator.error_message(validator, attribute, :inclusion)
20
20
 
21
- it_behaves_like "an invalid record", validatable, attribute, error_message
21
+ it_behaves_like "an invalid record",
22
+ validatable: validatable,
23
+ attribute: attribute,
24
+ error: :inclusion,
25
+ error_message: error_message
22
26
  end
23
27
 
24
28
  context "because the #{attribute} is not from an approved list" do
25
29
  validatable = validatable_class.new(values[:invalid])
26
30
  error_message = Helpers::Translator.error_message(validator, attribute, :inclusion)
27
31
 
28
- it_behaves_like "an invalid record", validatable, attribute, error_message
32
+ it_behaves_like "an invalid record",
33
+ validatable: validatable,
34
+ attribute: attribute,
35
+ error: :inclusion,
36
+ error_message: error_message
29
37
  end
30
38
  end
31
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defra_ruby_validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Defra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-07 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel