fix tests

This commit is contained in:
Matt McMahand 2021-12-20 20:28:42 -05:00
parent 6bc9eb8e69
commit 490ebca4e9
No known key found for this signature in database
GPG Key ID: E288164435BD1457
3 changed files with 5 additions and 4 deletions

View File

@ -7,6 +7,7 @@ Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
config.cache_classes = false config.cache_classes = false
config.active_record.legacy_connection_handling = false
# Do not eager load code on boot. This avoids loading your whole application # Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that # just for the purpose of running a single test. If you are using a tool that

View File

@ -1,7 +1,7 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets. # Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0' # Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path. # Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path # Rails.application.config.assets.paths << Emoji.images_path

View File

@ -9,15 +9,15 @@ describe Impressionist::SetupAssociation do
let(:setup_association) { described_class.new(mock) } let(:setup_association) { described_class.new(mock) }
it 'will include when togglable' do it 'will include when togglable' do
allow(mock).to receive(:attr_accessible).with(any_args).and_return(true) allow(mock).to receive(:attr_accessible).and_return(true)
allow(setup_association).to receive(:toggle).and_return(true) allow(setup_association).to receive(:toggle).and_return(true)
allow(setup_association).to be_include_attr_acc expect(setup_association).to be_include_attr_acc
end end
it 'will not include if it is not togglable' do it 'will not include if it is not togglable' do
allow(setup_association).to receive(:toggle).and_return(false) allow(setup_association).to receive(:toggle).and_return(false)
allow(setup_association).not_to be_include_attr_acc expect(setup_association).not_to be_include_attr_acc
end end
context 'when using rails >= 5' do context 'when using rails >= 5' do