Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidof committed Mar 10, 2019
1 parent c98a379 commit d8c80cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jsonapi-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'jsonapi-parser', '~> 0.1.0'

spec.add_development_dependency 'rails', '~> 5.0'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'sqlite3', '~> 1.3.6'
spec.add_development_dependency 'rake', '~> 11.3'
spec.add_development_dependency 'rspec-rails', '~> 3.5'
spec.add_development_dependency 'with_model', '~> 2.0'
Expand Down
4 changes: 3 additions & 1 deletion spec/dummy/config/initializers/new_framework_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
Rails.application.config.active_record.belongs_to_required_by_default = true

# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = false
if Rails.version < '5.2'
ActiveSupport.halt_callback_chains_on_return_false = false
end

# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
3 changes: 3 additions & 0 deletions spec/dummy/config/initializers/sqlite3_fix.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if Rails.version >= '5.1.0' && Rails.application.config.active_record.sqlite3.present?
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
end

0 comments on commit d8c80cf

Please sign in to comment.