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:
parent
e83f05da83
commit
4c326463ac
15 changed files with 7 additions and 5 deletions
|
@ -13,8 +13,6 @@ Layout/AccessModifierIndentation:
|
|||
|
||||
Layout/LineLength:
|
||||
Max: 80
|
||||
Exclude:
|
||||
- 'spec/lib/kernaux/sprintf_spec.rb'
|
||||
|
||||
Lint/AmbiguousOperatorPrecedence:
|
||||
Enabled: false
|
||||
|
|
|
@ -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']
|
Loading…
Reference in a new issue