govuk-content-schema-test-helpers 1.0.1 → 1.0.2

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: 906bc8e45e2ba472d55fff389747c51b6fcd0681
4
- data.tar.gz: a025e7bcb2d6a365dfd44326e0dfca7146f4d464
3
+ metadata.gz: 86714c339ce34aef53a446ed95e78eadf64244b1
4
+ data.tar.gz: 62f4df66147eb83d8eea6f65a8e72bdcae0a6ef7
5
5
  SHA512:
6
- metadata.gz: 3b6b22ea8e2bfe16f49d993fa61469fc850e10f4fe1544003dcde64a35b455d8033d81766f9ff67342bd14ac49801a816411dc5d7ccbfd1ff6b958dfef3415e1
7
- data.tar.gz: 8ea79a0196fa515f97abd91ffebe086df58d1823481c3ece47818da1317583295503c986ddc51e90cc4be326265a30198d171a53e025223d46faa1f83d5c58e0
6
+ metadata.gz: effa83b91f2b77d16df3a9d4eaebabf7eb3b41f1da5ec2d6a20d50e0e362cf6c15313ea7dc353178744265730f07ead1bc5eccdb2746065fed43d1ea34ef9708
7
+ data.tar.gz: 1c82c0f72755f5350afd4d38edc510fd92a481b49cb217eb284a37cd4d0001a8c985a9527220183b31db3ac6286d5a984ee673d0879f1c45a59f9f21ad73e165
@@ -12,10 +12,13 @@ module GovukContentSchemaTestHelpers
12
12
  "to be valid against '#{schema_name}' schema. Errors: #{validator.errors}"
13
13
  end
14
14
 
15
- # Required for a helpful message with RSpec 2
16
- failure_message_for_should do |actual|
17
- validator = Validator.new(schema_name, actual)
18
- "to be valid against '#{schema_name}' schema. Errors: #{validator.errors}"
15
+ if Gem.loaded_specs['rspec-expectations'].version < Gem::Version.new('3.0.0')
16
+ # Required for a helpful message with RSpec 2
17
+ # Generates a deprecation warning on 3.2.0
18
+ failure_message_for_should do |actual|
19
+ validator = Validator.new(schema_name, actual)
20
+ "to be valid against '#{schema_name}' schema. Errors: #{validator.errors}"
21
+ end
19
22
  end
20
23
  end
21
24
  end
@@ -1,3 +1,3 @@
1
1
  module GovukContentSchemaTestHelpers
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk-content-schema-test-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Cobbett