2018-03-04 15:09:32 +00:00
|
|
|
require_relative '../../spec_helper'
|
|
|
|
require_relative 'fixtures/classes'
|
|
|
|
require_relative 'shared/sprintf'
|
|
|
|
require_relative 'shared/sprintf_encoding'
|
2017-05-07 12:04:49 +00:00
|
|
|
|
|
|
|
describe "Kernel#sprintf" do
|
2019-07-27 12:40:09 +02:00
|
|
|
it_behaves_like :kernel_sprintf, -> format, *args {
|
2017-12-01 15:41:50 +00:00
|
|
|
sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 12:04:49 +00:00
|
|
|
|
2019-07-27 12:40:09 +02:00
|
|
|
it_behaves_like :kernel_sprintf_encoding, -> format, *args {
|
2017-12-01 15:41:50 +00:00
|
|
|
sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 12:04:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "Kernel.sprintf" do
|
2019-07-27 12:40:09 +02:00
|
|
|
it_behaves_like :kernel_sprintf, -> format, *args {
|
2017-12-01 15:41:50 +00:00
|
|
|
Kernel.sprintf(format, *args)
|
|
|
|
}
|
|
|
|
|
2019-07-27 12:40:09 +02:00
|
|
|
it_behaves_like :kernel_sprintf_encoding, -> format, *args {
|
2017-12-01 15:41:50 +00:00
|
|
|
Kernel.sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 12:04:49 +00:00
|
|
|
end
|