Upgrade to Ruby 3.0.4

This commit is contained in:
Karina Kwiatek 2022-07-23 10:02:06 +02:00 committed by Karina Kwiatek
parent ebda664898
commit 62b29b3bd1
4 changed files with 11 additions and 11 deletions

View File

@ -1 +1 @@
2.7.1 3.0.4

View File

@ -1,19 +1,19 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'dry-initializer' require "dry-initializer"
require 'types' require "types"
require 'errors' require "errors"
module UseCase module UseCase
class Base class Base
extend Dry::Initializer extend Dry::Initializer
def self.call(*args, **kwargs) def self.call(...)
new(*args, **kwargs).call new(...).call
end end
def call def call
raise NotImplementedError raise NotImplementedError
end end
end end
end end

View File

@ -42,14 +42,14 @@ describe UseCase::Relationship::Create do
let!(:user1) { FactoryBot.create(:user, screen_name: "timallen") } let!(:user1) { FactoryBot.create(:user, screen_name: "timallen") }
let!(:user2) { FactoryBot.create(:user, screen_name: "joehilyar") } let!(:user2) { FactoryBot.create(:user, screen_name: "joehilyar") }
subject { described_class.call(params) } subject { described_class.call(**params) }
context "type = 'follow'" do context "type = 'follow'" do
let(:type) { "follow" } let(:type) { "follow" }
include_examples "valid relationship type" include_examples "valid relationship type"
context "using screen names" do context "using User model instances" do
let(:source_user) { user1 } let(:source_user) { user1 }
let(:target_user) { user2 } let(:target_user) { user2 }
@ -62,7 +62,7 @@ describe UseCase::Relationship::Create do
include_examples "valid relationship type" include_examples "valid relationship type"
context "using screen names" do context "using User model instances" do
let(:source_user) { user1 } let(:source_user) { user1 }
let(:target_user) { user2 } let(:target_user) { user2 }

View File

@ -43,7 +43,7 @@ describe UseCase::Relationship::Destroy do
let!(:user1) { FactoryBot.create(:user, screen_name: "timallen") } let!(:user1) { FactoryBot.create(:user, screen_name: "timallen") }
let!(:user2) { FactoryBot.create(:user, screen_name: "joehilyar") } let!(:user2) { FactoryBot.create(:user, screen_name: "joehilyar") }
subject { described_class.call(params) } subject { described_class.call(**params) }
context "type = 'follow'" do context "type = 'follow'" do
let(:type) { "follow" } let(:type) { "follow" }