diff --git a/pkgs/ruby/.rubocop.yml b/pkgs/ruby/.rubocop.yml index 3b2fc4e..d04acb6 100644 --- a/pkgs/ruby/.rubocop.yml +++ b/pkgs/ruby/.rubocop.yml @@ -13,8 +13,6 @@ Layout/AccessModifierIndentation: Layout/LineLength: Max: 80 - Exclude: - - 'spec/lib/kernaux/sprintf_spec.rb' Lint/AmbiguousOperatorPrecedence: Enabled: false diff --git a/pkgs/ruby/spec/lib/kernaux/panic_spec.rb b/pkgs/ruby/spec/lib/kernaux/assert/panic_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/panic_spec.rb rename to pkgs/ruby/spec/lib/kernaux/assert/panic_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/itoa10_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/itoa10_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/itoa10_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/itoa10_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/itoa16_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/itoa16_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/itoa16_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/itoa16_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/itoa2_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/itoa2_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/itoa2_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/itoa2_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/itoa8_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/itoa8_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/itoa8_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/itoa8_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/itoa_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/itoa_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/itoa_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/itoa_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/utoa10_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/utoa10_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/utoa10_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/utoa10_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/utoa16_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/utoa16_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/utoa16_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/utoa16_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/utoa2_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/utoa2_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/utoa2_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/utoa2_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/utoa8_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/utoa8_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/utoa8_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/utoa8_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/utoa_spec.rb b/pkgs/ruby/spec/lib/kernaux/ntoa/utoa_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/utoa_spec.rb rename to pkgs/ruby/spec/lib/kernaux/ntoa/utoa_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/snprintf1_spec.rb b/pkgs/ruby/spec/lib/kernaux/printf/snprintf1_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/snprintf1_spec.rb rename to pkgs/ruby/spec/lib/kernaux/printf/snprintf1_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/sprintf1_spec.rb b/pkgs/ruby/spec/lib/kernaux/printf/sprintf1_spec.rb similarity index 100% rename from pkgs/ruby/spec/lib/kernaux/sprintf1_spec.rb rename to pkgs/ruby/spec/lib/kernaux/printf/sprintf1_spec.rb diff --git a/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb b/pkgs/ruby/spec/lib/kernaux/printf/sprintf_spec.rb similarity index 84% rename from pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb rename to pkgs/ruby/spec/lib/kernaux/printf/sprintf_spec.rb index 34b9927..e7aa465 100644 --- a/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb +++ b/pkgs/ruby/spec/lib/kernaux/printf/sprintf_spec.rb @@ -4,7 +4,9 @@ require 'spec_helper' RSpec.describe KernAux, '.sprintf' do if described_class.singleton_class.method_defined? :sprintf - subject(:sprintf) { described_class.sprintf 'Hello, ', ['%s', 'World'], '!' } + subject :sprintf do + described_class.sprintf 'Hello, ', ['%s', 'World'], '!' + end it { is_expected.to be_instance_of String } it { is_expected.to be_frozen } @@ -21,8 +23,10 @@ RSpec.describe KernAux, '.sprintf' do ['_orig', 'using original tests'], ].each do |(suffix, description)| context description do - printf_yml = - File.expand_path("../../../../../common/printf#{suffix}.yml", __dir__) + printf_yml = File.expand_path( + "../../../../../../common/printf#{suffix}.yml", + __dir__, + ) YAML.safe_load_file(printf_yml).each do |test| expected = test['result']