refactor!: update minimum Ruby version to 3.0

Этот коммит содержится в:
Mattia Roccoberton
2024-02-25 11:58:22 +01:00
родитель 22a1c8714c
Коммит ce65cfbb7e
10 изменённых файлов: 22 добавлений и 63 удалений

Просмотреть файл

@@ -12,7 +12,7 @@ require 'rspec/rails'
require 'capybara/rails'
require 'rspec/retry'
Dir[File.expand_path('support/**/*.rb', __dir__)].sort.each { |f| require f }
Dir[File.expand_path('support/**/*.rb', __dir__)].each { |f| require f }
# Force deprecations to raise an exception.
ActiveSupport::Deprecation.behavior = :raise
@@ -27,7 +27,7 @@ rescue ActiveRecord::PendingMigrationError => e
end
RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.fixture_path = Rails.root.join('spec/fixtures').to_s
config.infer_spec_type_from_file_location!
config.filter_rails_from_backtrace!

Просмотреть файл

@@ -9,18 +9,16 @@ Capybara.register_driver(:cuprite) do |app|
Capybara::Cuprite::Driver.new(
app,
**{
window_size: [1600, 1280],
# See additional options for Dockerized environment in the respective section of this article
browser_options: browser_options,
# Increase Chrome startup wait time (required for stable CI builds)
process_timeout: 20,
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
timeout: 20,
# Enable debugging capabilities
inspector: true,
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value
headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
}
window_size: [1600, 1280],
# See additional options for Dockerized environment in the respective section of this article
browser_options: browser_options,
# Increase Chrome startup wait time (required for stable CI builds)
process_timeout: 20,
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
timeout: 20,
# Enable debugging capabilities
inspector: true,
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value
headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
)
end

Просмотреть файл

@@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe 'Quill editor', type: :system do
RSpec.describe 'Quill editor' do
let(:author) { Author.create!(email: 'some_email@example.com', name: 'John Doe', age: 30) }
let!(:post) { Post.create!(title: 'Test', author: author, description: 'Some content...') }

Просмотреть файл

@@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe 'Quill JS', type: :system do
RSpec.describe 'Quill JS' do
it 'has a Javascript function defined and returns the version', :aggregate_failures do
visit '/admin/posts'