defra_ruby_validators 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/defra_ruby/validators/business_type_validator/en.yml +1 -2
  3. data/config/locales/defra_ruby/validators/companies_house_number_validator/en.yml +5 -6
  4. data/config/locales/defra_ruby/validators/email_validator/en.yml +2 -3
  5. data/config/locales/defra_ruby/validators/grid_reference_validator/en.yml +3 -4
  6. data/config/locales/defra_ruby/validators/location_validator/en.yml +1 -2
  7. data/config/locales/defra_ruby/validators/phone_number_validator/en.yml +3 -4
  8. data/config/locales/defra_ruby/validators/position_validator/en.yml +2 -3
  9. data/config/locales/defra_ruby/validators/token_validator/en.yml +2 -3
  10. data/config/locales/defra_ruby/validators/true_false_validator/en.yml +1 -2
  11. data/lib/defra_ruby/validators/base_validator.rb +2 -2
  12. data/lib/defra_ruby/validators/companies_house_number_validator.rb +5 -5
  13. data/lib/defra_ruby/validators/concerns/can_validate_characters.rb +1 -1
  14. data/lib/defra_ruby/validators/concerns/can_validate_length.rb +1 -1
  15. data/lib/defra_ruby/validators/concerns/can_validate_presence.rb +1 -1
  16. data/lib/defra_ruby/validators/concerns/can_validate_selection.rb +1 -1
  17. data/lib/defra_ruby/validators/email_validator.rb +1 -1
  18. data/lib/defra_ruby/validators/grid_reference_validator.rb +2 -2
  19. data/lib/defra_ruby/validators/phone_number_validator.rb +1 -1
  20. data/lib/defra_ruby/validators/token_validator.rb +1 -1
  21. data/lib/defra_ruby/validators/version.rb +1 -1
  22. data/spec/defra_ruby/validators/business_type_validator_spec.rb +1 -1
  23. data/spec/defra_ruby/validators/companies_house_number_validator_spec.rb +5 -25
  24. data/spec/defra_ruby/validators/email_validator_spec.rb +1 -1
  25. data/spec/defra_ruby/validators/grid_reference_validator_spec.rb +2 -2
  26. data/spec/defra_ruby/validators/location_validator_spec.rb +1 -1
  27. data/spec/defra_ruby/validators/phone_number_validator_spec.rb +1 -1
  28. data/spec/defra_ruby/validators/token_validator_spec.rb +1 -1
  29. data/spec/examples.txt +165 -81
  30. data/spec/support/helpers/translator.rb +2 -2
  31. data/spec/support/shared_examples/validators/characters_validator.rb +1 -1
  32. data/spec/support/shared_examples/validators/length_validator.rb +1 -1
  33. data/spec/support/shared_examples/validators/presence_validator.rb +1 -1
  34. data/spec/support/shared_examples/validators/selection_validator.rb +2 -2
  35. metadata +20 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 335cd07927a66b2234c6d46e3679c36cce4ea8d9
4
- data.tar.gz: bbf40277daa6034e9a6fa475f6eb87720c639aa1
3
+ metadata.gz: b2d6572ea54334edce203a7aa2bd925991e39704
4
+ data.tar.gz: 6902560347d17edca0edb89944068a5d284eb33e
5
5
  SHA512:
6
- metadata.gz: 4bcf3e27a98c5cf07824a7d2b65b882163fb793aa7db0f9b065c5e30a32688ca5c9342dda9a2ad2ce3bea9871953c9434ba32353c22dd12958ed280ccc4bf45a
7
- data.tar.gz: e8aff732a95ac9952b6f4360e1f0014d1203ff1dd0581b87c0d18427fd0910df986d48718ef4f311bdbf83cbf32347c7a69485aef6dea413b678b281ab54077e
6
+ metadata.gz: d8b16fb07610e2baf7ffb60c610031961448db71c6a0e99accd21081bfcd611c01fa13f8016f5965a5b194a16ed959e5402ad6c109e916ee8512f1ef5de26a6d
7
+ data.tar.gz: 410322d7defe820220ba9a51a1caa079f841d3823fad439b7b93e1828d5d4eef32bbb4a338fad98c91a022be8535535686f1854f2855a62ddf5e782044300857
@@ -2,5 +2,4 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  BusinessTypeValidator:
5
- business_type:
6
- inclusion: "You must answer this question"
5
+ inclusion: "You must answer this question"
@@ -2,9 +2,8 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  CompaniesHouseNumberValidator:
5
- company_no:
6
- blank: Enter a company registration number
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
- not_found: Companies House couldn't find a company with this number
9
- inactive: Your company must be registered as an active company
10
- error: There was an error connecting with Companies House. Hopefully this is a one off and will work if you try again.
5
+ blank: Enter a company registration number
6
+ 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."
7
+ not_found: Companies House couldn't find a company with this number
8
+ inactive: Your company must be registered as an active company
9
+ error: There was an error connecting with Companies House. Hopefully this is a one off and will work if you try again.
@@ -2,6 +2,5 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  EmailValidator:
5
- email:
6
- blank: "Enter an email address"
7
- invalid_format: "Enter a valid email address - there’s a mistake in that one"
5
+ blank: "Enter an email address"
6
+ invalid_format: "Enter a valid email address - there’s a mistake in that one"
@@ -2,7 +2,6 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  GridReferenceValidator:
5
- grid_reference:
6
- blank: Enter a grid reference
7
- invalid_format: The grid reference should have 2 letters and 10 digits
8
- invalid: The grid reference is not a valid coordinate
5
+ blank: Enter a grid reference
6
+ invalid_format: The grid reference should have 2 letters and 10 digits
7
+ invalid: The grid reference is not a valid coordinate
@@ -2,5 +2,4 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  LocationValidator:
5
- location:
6
- inclusion: "You must answer this question"
5
+ inclusion: "You must answer this question"
@@ -2,7 +2,6 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  PhoneNumberValidator:
5
- phone_number:
6
- blank: "Enter a telephone number"
7
- invalid_format: "Enter a valid telephone number"
8
- too_long: "Check the number you entered - it should have no more than than 15 characters"
5
+ blank: "Enter a telephone number"
6
+ invalid_format: "Enter a valid telephone number"
7
+ too_long: "Check the number you entered - it should have no more than than 15 characters"
@@ -2,6 +2,5 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  PositionValidator:
5
- position:
6
- invalid_format: "The position must contain only letters, spaces, commas, full stops, hyphens and apostrophes"
7
- too_long: "The position must have no more than 70 characters"
5
+ invalid_format: "The position must contain only letters, spaces, commas, full stops, hyphens and apostrophes"
6
+ too_long: "The position must have no more than 70 characters"
@@ -2,6 +2,5 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  TokenValidator:
5
- token:
6
- invalid_format: "The token is not valid"
7
- blank: "The token is missing"
5
+ invalid_format: "The token is not valid"
6
+ blank: "The token is missing"
@@ -2,5 +2,4 @@ en:
2
2
  defra_ruby:
3
3
  validators:
4
4
  TrueFalseValidator:
5
- attribute:
6
- inclusion: "You must answer this question"
5
+ inclusion: "You must answer this question"
@@ -6,11 +6,11 @@ module DefraRuby
6
6
 
7
7
  protected
8
8
 
9
- def error_message(attribute, error)
9
+ def error_message(error)
10
10
  if options[:messages] && options[:messages][error]
11
11
  options[:messages][error]
12
12
  else
13
- I18n.t("defra_ruby.validators.#{class_name}.#{attribute}.#{error}")
13
+ I18n.t("defra_ruby.validators.#{class_name}.#{error}")
14
14
  end
15
15
  end
16
16
 
@@ -25,14 +25,14 @@ module DefraRuby
25
25
  def value_is_present?(record, attribute, value)
26
26
  return true if value.present?
27
27
 
28
- record.errors[attribute] << error_message(:company_no, :blank)
28
+ record.errors[attribute] << error_message(:blank)
29
29
  false
30
30
  end
31
31
 
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_format)
35
+ record.errors[attribute] << error_message(:invalid_format)
36
36
  false
37
37
  end
38
38
 
@@ -41,12 +41,12 @@ module DefraRuby
41
41
  when :active
42
42
  true
43
43
  when :inactive
44
- record.errors[attribute] << error_message(:company_no, :inactive)
44
+ record.errors[attribute] << error_message(:inactive)
45
45
  when :not_found
46
- record.errors[attribute] << error_message(:company_no, :not_found)
46
+ record.errors[attribute] << error_message(:not_found)
47
47
  end
48
48
  rescue StandardError
49
- record.errors[attribute] << error_message(:company_no, :error)
49
+ record.errors[attribute] << error_message(:error)
50
50
  end
51
51
 
52
52
  end
@@ -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_format)
13
+ record.errors[attribute] << error_message(:invalid_format)
14
14
  false
15
15
  end
16
16
 
@@ -9,7 +9,7 @@ module DefraRuby
9
9
  def value_is_not_too_long?(record, attribute, value, max_length)
10
10
  return true if value.length <= max_length
11
11
 
12
- record.errors[attribute] << error_message(attribute, :too_long)
12
+ record.errors[attribute] << error_message(:too_long)
13
13
  false
14
14
  end
15
15
 
@@ -9,7 +9,7 @@ module DefraRuby
9
9
  def value_is_present?(record, attribute, value)
10
10
  return true if value.present?
11
11
 
12
- record.errors[attribute] << error_message(attribute, :blank)
12
+ record.errors[attribute] << error_message(:blank)
13
13
  false
14
14
  end
15
15
 
@@ -9,7 +9,7 @@ module DefraRuby
9
9
  def value_is_included?(record, attribute, value, valid_options)
10
10
  return true if value.present? && valid_options.include?(value)
11
11
 
12
- record.errors[attribute] << error_message(attribute, :inclusion)
12
+ record.errors[attribute] << error_message(:inclusion)
13
13
  false
14
14
  end
15
15
 
@@ -19,7 +19,7 @@ module DefraRuby
19
19
  # validate_email_format returns nil if the validation passes
20
20
  return true unless ValidatesEmailFormatOf.validate_email_format(value)
21
21
 
22
- record.errors[attribute] << error_message(:email, :invalid_format)
22
+ record.errors[attribute] << error_message(:invalid_format)
23
23
  false
24
24
  end
25
25
 
@@ -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, :invalid_format)
25
+ record.errors[attribute] << error_message(:invalid_format)
26
26
  false
27
27
  end
28
28
 
@@ -30,7 +30,7 @@ module DefraRuby
30
30
  OsMapRef::Location.for(value).easting
31
31
  true
32
32
  rescue OsMapRef::Error
33
- record.errors[attribute] << error_message(:grid_reference, :invalid)
33
+ record.errors[attribute] << error_message(:invalid)
34
34
  false
35
35
  end
36
36
 
@@ -23,7 +23,7 @@ module DefraRuby
23
23
  Phonelib.default_country = "GB"
24
24
  return true if Phonelib.valid?(value)
25
25
 
26
- record.errors[attribute] << error_message(:phone_number, :invalid_format)
26
+ record.errors[attribute] << error_message(:invalid_format)
27
27
  false
28
28
  end
29
29
 
@@ -19,7 +19,7 @@ module DefraRuby
19
19
  # 24-character unique tokens
20
20
  return true if value.length == 24
21
21
 
22
- record.errors[attribute] << error_message(:token, :invalid_format)
22
+ record.errors[attribute] << error_message(:invalid_format)
23
23
  false
24
24
  end
25
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DefraRuby
4
4
  module Validators
5
- VERSION = "2.1.1"
5
+ VERSION = "2.1.2"
6
6
  end
7
7
  end
@@ -42,7 +42,7 @@ module DefraRuby
42
42
  allow_any_instance_of(DefraRuby::Validators::BaseValidator).to receive(:options).and_return({})
43
43
  end
44
44
 
45
- error_message = Helpers::Translator.error_message(BusinessTypeValidator, :business_type, :inclusion)
45
+ error_message = Helpers::Translator.error_message(BusinessTypeValidator, :inclusion)
46
46
 
47
47
  it_behaves_like "an invalid record",
48
48
  validatable: validatable,
@@ -37,11 +37,7 @@ module DefraRuby
37
37
  context "when given an invalid company number" do
38
38
  context "because it is blank" do
39
39
  validatable = Test::CompaniesHouseNumberValidatable.new
40
- error_message = Helpers::Translator.error_message(
41
- CompaniesHouseNumberValidator,
42
- :company_no,
43
- :blank
44
- )
40
+ error_message = Helpers::Translator.error_message(CompaniesHouseNumberValidator, :blank)
45
41
 
46
42
  it_behaves_like "an invalid record",
47
43
  validatable: validatable,
@@ -52,11 +48,7 @@ module DefraRuby
52
48
 
53
49
  context "because the format is wrong" do
54
50
  validatable = Test::CompaniesHouseNumberValidatable.new(invalid_format_number)
55
- error_message = Helpers::Translator.error_message(
56
- CompaniesHouseNumberValidator,
57
- :company_no,
58
- :invalid_format
59
- )
51
+ error_message = Helpers::Translator.error_message(CompaniesHouseNumberValidator, :invalid_format)
60
52
 
61
53
  it_behaves_like "an invalid record",
62
54
  validatable: validatable,
@@ -71,11 +63,7 @@ module DefraRuby
71
63
  end
72
64
 
73
65
  validatable = Test::CompaniesHouseNumberValidatable.new(unknown_number)
74
- error_message = Helpers::Translator.error_message(
75
- CompaniesHouseNumberValidator,
76
- :company_no,
77
- :not_found
78
- )
66
+ error_message = Helpers::Translator.error_message(CompaniesHouseNumberValidator, :not_found)
79
67
 
80
68
  it_behaves_like "an invalid record",
81
69
  validatable: validatable,
@@ -90,11 +78,7 @@ module DefraRuby
90
78
  end
91
79
 
92
80
  validatable = Test::CompaniesHouseNumberValidatable.new(inactive_number)
93
- error_message = Helpers::Translator.error_message(
94
- CompaniesHouseNumberValidator,
95
- :company_no,
96
- :inactive
97
- )
81
+ error_message = Helpers::Translator.error_message(CompaniesHouseNumberValidator, :inactive)
98
82
 
99
83
  it_behaves_like "an invalid record",
100
84
  validatable: validatable,
@@ -110,11 +94,7 @@ module DefraRuby
110
94
  end
111
95
 
112
96
  validatable = Test::CompaniesHouseNumberValidatable.new(valid_numbers.sample)
113
- error_message = Helpers::Translator.error_message(
114
- CompaniesHouseNumberValidator,
115
- :company_no,
116
- :error
117
- )
97
+ error_message = Helpers::Translator.error_message(CompaniesHouseNumberValidator, :error)
118
98
 
119
99
  it_behaves_like "an invalid record",
120
100
  validatable: validatable,
@@ -31,7 +31,7 @@ module DefraRuby
31
31
  context "because the email is not correctly formatted" do
32
32
  validatable = Test::EmailValidatable.new(invalid_email)
33
33
 
34
- error_message = Helpers::Translator.error_message(EmailValidator, :email, :invalid_format)
34
+ error_message = Helpers::Translator.error_message(EmailValidator, :invalid_format)
35
35
 
36
36
  it_behaves_like "an invalid record",
37
37
  validatable: validatable,
@@ -31,7 +31,7 @@ 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, :invalid_format)
34
+ error_message = Helpers::Translator.error_message(GridReferenceValidator, :invalid_format)
35
35
 
36
36
  it_behaves_like "an invalid record",
37
37
  validatable: validatable,
@@ -42,7 +42,7 @@ module DefraRuby
42
42
 
43
43
  context "because the grid reference is not a coordinate" do
44
44
  validatable = Test::GridReferenceValidatable.new(non_coordinate_grid_reference)
45
- error_message = Helpers::Translator.error_message(GridReferenceValidator, :grid_reference, :invalid)
45
+ error_message = Helpers::Translator.error_message(GridReferenceValidator, :invalid)
46
46
 
47
47
  it_behaves_like "an invalid record",
48
48
  validatable: validatable,
@@ -42,7 +42,7 @@ module DefraRuby
42
42
  allow_any_instance_of(DefraRuby::Validators::BaseValidator).to receive(:options).and_return({})
43
43
  end
44
44
 
45
- error_message = Helpers::Translator.error_message(LocationValidator, :location, :inclusion)
45
+ error_message = Helpers::Translator.error_message(LocationValidator, :inclusion)
46
46
 
47
47
  it_behaves_like "an invalid record",
48
48
  validatable: validatable,
@@ -44,7 +44,7 @@ module DefraRuby
44
44
  context "when the phone number is not valid" do
45
45
  context "because the phone number is not correctly formatted" do
46
46
  validatable = Test::PhoneNumberValidatable.new(invalid_number)
47
- error_message = Helpers::Translator.error_message(PhoneNumberValidator, :phone_number, :invalid_format)
47
+ error_message = Helpers::Translator.error_message(PhoneNumberValidator, :invalid_format)
48
48
 
49
49
  it_behaves_like "an invalid record",
50
50
  validatable: validatable,
@@ -30,7 +30,7 @@ module DefraRuby
30
30
  context "when the token is not valid" do
31
31
  context "because the token is not correctly formatted" do
32
32
  validatable = Test::TokenValidatable.new(invalid_token)
33
- error_message = Helpers::Translator.error_message(TokenValidator, :token, :invalid_format)
33
+ error_message = Helpers::Translator.error_message(TokenValidator, :invalid_format)
34
34
 
35
35
  it_behaves_like "an invalid record",
36
36
  validatable: validatable,
data/spec/examples.txt CHANGED
@@ -1,81 +1,165 @@
1
- example_id | status | run_time |
2
- ---------------------------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.00145 seconds |
4
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.00011 seconds |
5
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00017 seconds |
6
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00445 seconds |
7
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00018 seconds |
8
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00016 seconds |
9
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00059 seconds |
10
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00016 seconds |
11
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.0002 seconds |
12
- ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00018 seconds |
13
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00009 seconds |
14
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00043 seconds |
15
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00044 seconds |
16
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00043 seconds |
17
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.00041 seconds |
18
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.00045 seconds |
19
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.00646 seconds |
20
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00042 seconds |
21
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00038 seconds |
22
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00015 seconds |
23
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00016 seconds |
24
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.00017 seconds |
25
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.00017 seconds |
26
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00015 seconds |
27
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:3] | passed | 0.0002 seconds |
28
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.00046 seconds |
29
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00042 seconds |
30
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00043 seconds |
31
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00046 seconds |
32
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.00046 seconds |
33
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00044 seconds |
34
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00045 seconds |
35
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00042 seconds |
36
- ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.00046 seconds |
37
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.10949 seconds |
38
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.22067 seconds |
39
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.11422 seconds |
40
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.01368 seconds |
41
- ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.01557 seconds |
42
- ./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.0014 seconds |
43
- ./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.00045 seconds |
44
- ./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.00113 seconds |
45
- ./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00015 seconds |
46
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
47
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
48
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00014 seconds |
49
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
50
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00018 seconds |
51
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00019 seconds |
52
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00023 seconds |
53
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00013 seconds |
54
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00017 seconds |
55
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00015 seconds |
56
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00021 seconds |
57
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00019 seconds |
58
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.0003 seconds |
59
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00014 seconds |
60
- ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00018 seconds |
61
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.00009 seconds |
62
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.00012 seconds |
63
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.0002 seconds |
64
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00012 seconds |
65
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00018 seconds |
66
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00014 seconds |
67
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00017 seconds |
68
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00018 seconds |
69
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00016 seconds |
70
- ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00015 seconds |
71
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
72
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
73
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00014 seconds |
74
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00015 seconds |
75
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00017 seconds |
76
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00016 seconds |
77
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00024 seconds |
78
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00019 seconds |
79
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00018 seconds |
80
- ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00019 seconds |
81
- ./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.001 seconds |
1
+ example_id | status | run_time |
2
+ ------------------------------------------------------------------------------------ | ------ | --------------- |
3
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
4
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
5
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00013 seconds |
6
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00018 seconds |
7
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00035 seconds |
8
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00016 seconds |
9
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00019 seconds |
10
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00213 seconds |
11
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00028 seconds |
12
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00022 seconds |
13
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00023 seconds |
14
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00096 seconds |
15
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:1] | passed | 0.00072 seconds |
16
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:2] | passed | 0.00071 seconds |
17
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:1] | passed | 0.00116 seconds |
18
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:2] | passed | 0.00108 seconds |
19
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:3] | passed | 0.00088 seconds |
20
+ ./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00112 seconds |
21
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00012 seconds |
22
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00052 seconds |
23
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00057 seconds |
24
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00054 seconds |
25
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.0007 seconds |
26
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.00058 seconds |
27
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.0005 seconds |
28
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00057 seconds |
29
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00073 seconds |
30
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00052 seconds |
31
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00034 seconds |
32
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.00025 seconds |
33
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:4:1] | passed | 0.00168 seconds |
34
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.0002 seconds |
35
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00015 seconds |
36
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:3] | passed | 0.0003 seconds |
37
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:4:1] | passed | 0.03648 seconds |
38
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.00114 seconds |
39
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00075 seconds |
40
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00133 seconds |
41
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:4:1] | passed | 0.00224 seconds |
42
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00086 seconds |
43
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.00091 seconds |
44
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00098 seconds |
45
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:4:1] | passed | 0.00104 seconds |
46
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00056 seconds |
47
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00069 seconds |
48
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.00052 seconds |
49
+ ./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:4:1] | passed | 0.00374 seconds |
50
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.01591 seconds |
51
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.01718 seconds |
52
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.01637 seconds |
53
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.0254 seconds |
54
+ ./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.01415 seconds |
55
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.00236 seconds |
56
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.00013 seconds |
57
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.00017 seconds |
58
+ ./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00018 seconds |
59
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
60
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:1] | passed | 0.00011 seconds |
61
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00041 seconds |
62
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00025 seconds |
63
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00026 seconds |
64
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00017 seconds |
65
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00022 seconds |
66
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00083 seconds |
67
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00033 seconds |
68
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00026 seconds |
69
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00029 seconds |
70
+ ./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.0008 seconds |
71
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:1:1] | passed | 0.00263 seconds |
72
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:1] | passed | 0.00035 seconds |
73
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:1] | passed | 0.0142 seconds |
74
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00033 seconds |
75
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00048 seconds |
76
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00143 seconds |
77
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00031 seconds |
78
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.01478 seconds |
79
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00048 seconds |
80
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00025 seconds |
81
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00047 seconds |
82
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00102 seconds |
83
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:1] | passed | 0.0004 seconds |
84
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:2] | passed | 0.00071 seconds |
85
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:3] | passed | 0.00051 seconds |
86
+ ./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:4:1] | passed | 0.00094 seconds |
87
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
88
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:1] | passed | 0.00022 seconds |
89
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00015 seconds |
90
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:2] | passed | 0.0003 seconds |
91
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00032 seconds |
92
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00045 seconds |
93
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00051 seconds |
94
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.0014 seconds |
95
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00079 seconds |
96
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00045 seconds |
97
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00024 seconds |
98
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00108 seconds |
99
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:1] | passed | 0.00082 seconds |
100
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:2] | passed | 0.00095 seconds |
101
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:1] | passed | 0.0014 seconds |
102
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:2] | passed | 0.00076 seconds |
103
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:3] | passed | 0.00159 seconds |
104
+ ./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00106 seconds |
105
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:1:1] | passed | 0.0004 seconds |
106
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:1] | passed | 0.00011 seconds |
107
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.02939 seconds |
108
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00245 seconds |
109
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.0002 seconds |
110
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00016 seconds |
111
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00025 seconds |
112
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00106 seconds |
113
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:1] | passed | 0.00029 seconds |
114
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00337 seconds |
115
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00438 seconds |
116
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00087 seconds |
117
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00026 seconds |
118
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00047 seconds |
119
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00126 seconds |
120
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00946 seconds |
121
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00035 seconds |
122
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:3] | passed | 0.0002 seconds |
123
+ ./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:4:1] | passed | 0.00084 seconds |
124
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
125
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.00012 seconds |
126
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00021 seconds |
127
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00024 seconds |
128
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00034 seconds |
129
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00018 seconds |
130
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00027 seconds |
131
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00155 seconds |
132
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00011 seconds |
133
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00014 seconds |
134
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00022 seconds |
135
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00037 seconds |
136
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00068 seconds |
137
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00025 seconds |
138
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00106 seconds |
139
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00057 seconds |
140
+ ./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00016 seconds |
141
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.0008 seconds |
142
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
143
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00037 seconds |
144
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00017 seconds |
145
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00051 seconds |
146
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.0002 seconds |
147
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00019 seconds |
148
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00129 seconds |
149
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00018 seconds |
150
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00019 seconds |
151
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00019 seconds |
152
+ ./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00109 seconds |
153
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
154
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.00012 seconds |
155
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00033 seconds |
156
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00019 seconds |
157
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.0002 seconds |
158
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00017 seconds |
159
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00026 seconds |
160
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00118 seconds |
161
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00042 seconds |
162
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00017 seconds |
163
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00024 seconds |
164
+ ./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00116 seconds |
165
+ ./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.00221 seconds |
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Helpers
4
4
  module Translator
5
- def self.error_message(klass, attribute, error)
5
+ def self.error_message(klass, error)
6
6
  class_name = klass_name(klass)
7
7
 
8
- I18n.t("defra_ruby.validators.#{class_name}.#{attribute}.#{error}")
8
+ I18n.t("defra_ruby.validators.#{class_name}.#{error}")
9
9
  end
10
10
 
11
11
  def self.klass_name(klass)
@@ -16,7 +16,7 @@ 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_format)
19
+ error_message = Helpers::Translator.error_message(validator, :invalid_format)
20
20
 
21
21
  it_behaves_like "an invalid record",
22
22
  validatable: validatable,
@@ -16,7 +16,7 @@ RSpec.shared_examples "a length validator" do |validator, validatable_class, att
16
16
  context "when the #{attribute} is not valid" do
17
17
  context "because the #{attribute} is too long" do
18
18
  validatable = validatable_class.new(values[:invalid])
19
- error_message = Helpers::Translator.error_message(validator, attribute, :too_long)
19
+ error_message = Helpers::Translator.error_message(validator, :too_long)
20
20
 
21
21
  it_behaves_like "an invalid record",
22
22
  validatable: validatable,
@@ -16,7 +16,7 @@ RSpec.shared_examples "a presence validator" do |validator, validatable_class, a
16
16
  context "when the #{attribute} is not valid" do
17
17
  context "because the #{attribute} is not present" do
18
18
  validatable = validatable_class.new
19
- error_message = Helpers::Translator.error_message(validator, attribute, :blank)
19
+ error_message = Helpers::Translator.error_message(validator, :blank)
20
20
 
21
21
  it_behaves_like "an invalid record",
22
22
  validatable: validatable,
@@ -16,7 +16,7 @@ RSpec.shared_examples "a selection validator" do |validator, validatable_class,
16
16
  context "when the #{attribute} is not valid" do
17
17
  context "because the #{attribute} is not present" do
18
18
  validatable = validatable_class.new
19
- error_message = Helpers::Translator.error_message(validator, attribute, :inclusion)
19
+ error_message = Helpers::Translator.error_message(validator, :inclusion)
20
20
 
21
21
  it_behaves_like "an invalid record",
22
22
  validatable: validatable,
@@ -27,7 +27,7 @@ RSpec.shared_examples "a selection validator" do |validator, validatable_class,
27
27
 
28
28
  context "because the #{attribute} is not from an approved list" do
29
29
  validatable = validatable_class.new(values[:invalid])
30
- error_message = Helpers::Translator.error_message(validator, attribute, :inclusion)
30
+ error_message = Helpers::Translator.error_message(validator, :inclusion)
31
31
 
32
32
  it_behaves_like "an invalid record",
33
33
  validatable: validatable,
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: 2.1.1
4
+ version: 2.1.2
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-28 00:00:00.000000000 Z
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -318,34 +318,34 @@ signing_key:
318
318
  specification_version: 4
319
319
  summary: Defra ruby on rails validations
320
320
  test_files:
321
- - spec/spec_helper.rb
322
- - spec/defra_ruby/validators_spec.rb
321
+ - spec/cassettes/company_no_inactive.yml
322
+ - spec/cassettes/company_no_not_found.yml
323
+ - spec/cassettes/company_no_valid.yml
324
+ - spec/defra_ruby/validators/business_type_validator_spec.rb
325
+ - spec/defra_ruby/validators/companies_house_number_validator_spec.rb
323
326
  - spec/defra_ruby/validators/companies_house_service_spec.rb
324
327
  - spec/defra_ruby/validators/configuration_spec.rb
328
+ - spec/defra_ruby/validators/email_validator_spec.rb
329
+ - spec/defra_ruby/validators/grid_reference_validator_spec.rb
330
+ - spec/defra_ruby/validators/location_validator_spec.rb
325
331
  - spec/defra_ruby/validators/phone_number_validator_spec.rb
326
332
  - spec/defra_ruby/validators/position_validator_spec.rb
327
- - spec/defra_ruby/validators/grid_reference_validator_spec.rb
328
- - spec/defra_ruby/validators/business_type_validator_spec.rb
329
- - spec/defra_ruby/validators/companies_house_number_validator_spec.rb
330
333
  - spec/defra_ruby/validators/token_validator_spec.rb
331
334
  - spec/defra_ruby/validators/true_false_validator_spec.rb
332
- - spec/defra_ruby/validators/location_validator_spec.rb
333
- - spec/defra_ruby/validators/email_validator_spec.rb
335
+ - spec/defra_ruby/validators_spec.rb
334
336
  - spec/examples.txt
335
- - spec/cassettes/company_no_not_found.yml
336
- - spec/cassettes/company_no_valid.yml
337
- - spec/cassettes/company_no_inactive.yml
338
- - spec/support/simplecov.rb
339
- - spec/support/i18n.rb
340
- - spec/support/vcr.rb
341
- - spec/support/pry.rb
337
+ - spec/spec_helper.rb
342
338
  - spec/support/defra_ruby_validators.rb
343
- - spec/support/helpers/translator.rb
344
339
  - spec/support/helpers/text_generator.rb
345
- - spec/support/shared_examples/validators/selection_validator.rb
346
- - spec/support/shared_examples/validators/invalid_record.rb
347
- - spec/support/shared_examples/validators/presence_validator.rb
340
+ - spec/support/helpers/translator.rb
341
+ - spec/support/i18n.rb
342
+ - spec/support/pry.rb
348
343
  - spec/support/shared_examples/validators/characters_validator.rb
344
+ - spec/support/shared_examples/validators/invalid_record.rb
349
345
  - spec/support/shared_examples/validators/length_validator.rb
346
+ - spec/support/shared_examples/validators/presence_validator.rb
347
+ - spec/support/shared_examples/validators/selection_validator.rb
350
348
  - spec/support/shared_examples/validators/valid_record.rb
351
349
  - spec/support/shared_examples/validators/validator.rb
350
+ - spec/support/simplecov.rb
351
+ - spec/support/vcr.rb