Skip to content

Commit

Permalink
updates spec to use Integer instead of Fixnum
Browse files Browse the repository at this point in the history
As of Ruby 2.4, Fixnum and Bignum have been removed and we should now be
using Integer.

https://bugs.ruby-lang.org/issues/12005
rails/rails#25056
  • Loading branch information
aliuk2012 committed Oct 9, 2018
1 parent fbb5fa2 commit 0858c33
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -179,13 +179,13 @@ def can_assign_responder?
end
end

context 'permitted workflows is a Fixnum' do
context 'permitted workflows is an Integer' do
it 'errors' do
config.case_types.foi.permitted_workflows = 55
validator = ConfigValidator.new(config, filename)
expect{
validator.run
}.to raise_error ConfigurationError, /File #{filename} section case_types\/foi\/permitted_workflows: Expected an array, got Fixnum/
}.to raise_error ConfigurationError, /File #{filename} section case_types\/foi\/permitted_workflows: Expected an array, got Integer/
end
end

Expand All @@ -206,7 +206,7 @@ def can_assign_responder?
validator = ConfigValidator.new(config, filename)
expect{
validator.run
}.to raise_error ConfigurationError, "File #{filename} section case_types/foi: Expected workflows to be a Hash, is a Fixnum"
}.to raise_error ConfigurationError, "File #{filename} section case_types/foi: Expected workflows to be a Hash, is a Integer"
end
end

Expand Down Expand Up @@ -256,7 +256,7 @@ def can_assign_responder?
validator = ConfigValidator.new(config, filename)
expect{
validator.run
}.to raise_error ConfigurationError, "File #{filename} section case_types/foi/workflows/standard: Expected user_roles to be a Hash, got Fixnum"
}.to raise_error ConfigurationError, "File #{filename} section case_types/foi/workflows/standard: Expected user_roles to be a Hash, got Integer"
end
end

Expand Down

0 comments on commit 0858c33

Please sign in to comment.