1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Ruby: move spec files

This commit is contained in:
Alex Kotov 2022-06-01 03:55:11 +03:00
parent e83f05da83
commit 4c326463ac
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
15 changed files with 7 additions and 5 deletions

View file

@ -13,8 +13,6 @@ Layout/AccessModifierIndentation:
Layout/LineLength:
Max: 80
Exclude:
- 'spec/lib/kernaux/sprintf_spec.rb'
Lint/AmbiguousOperatorPrecedence:
Enabled: false

View file

@ -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']