Skip to content

Commit

Permalink
chore: drop database_cleaner, use rspec-rails transactional_fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Sep 21, 2023
1 parent df88ba5 commit e2522ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion imgproxy-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "combustion", ">= 1.1"
s.add_development_dependency "rake", ">= 13.0"
s.add_development_dependency "rspec", ">= 3.9"
s.add_development_dependency "rspec-rails", ">= 4.0"
s.add_development_dependency "rails", "~> 7.0.3"
s.add_development_dependency "image_processing", "~> 1.2"
s.add_development_dependency "database_cleaner-active_record"
end
14 changes: 2 additions & 12 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require "spec_helper"

require "bundler/setup"
require "combustion"
begin
Combustion.initialize!(:active_storage, :active_record) do
Expand All @@ -14,8 +13,8 @@
exit(1)
end

require "rspec/rails"
require "imgproxy-rails"
require "database_cleaner/active_record"

class User < ActiveRecord::Base
has_one_attached :avatar
Expand All @@ -32,14 +31,5 @@ class User < ActiveRecord::Base
).migrate

RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end

config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
config.use_transactional_fixtures = true
end

0 comments on commit e2522ad

Please sign in to comment.