Upload media to mastodon
This commit is contained in:
@@ -9,14 +9,14 @@ RSpec.configure do |config|
|
||||
DatabaseCleaner[:sequel].clean_with :truncation
|
||||
end
|
||||
|
||||
config.prepend_before :each, type: :db do |example|
|
||||
config.prepend_before :each, :db do |example|
|
||||
strategy = example.metadata[:js] ? :truncation : :transaction
|
||||
DatabaseCleaner[:sequel].strategy = strategy
|
||||
|
||||
DatabaseCleaner[:sequel].start
|
||||
end
|
||||
|
||||
config.append_after :each, type: :db do
|
||||
config.append_after :each, :db do
|
||||
DatabaseCleaner[:sequel].clean
|
||||
end
|
||||
end
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# require_with_metadata: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "rack/test"
|
||||
@@ -7,6 +8,6 @@ RSpec.shared_context "Hanami app" do
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.include Rack::Test::Methods, type: :request
|
||||
config.include_context "Hanami app", type: :request
|
||||
config.include Rack::Test::Methods, :requests
|
||||
config.include_context "Hanami app", :requests
|
||||
end
|
||||
|
Reference in New Issue
Block a user