2017-05-07 08:04:49 -04:00
|
|
|
require File.expand_path('../../../spec_helper', __FILE__)
|
|
|
|
require File.expand_path('../fixtures/classes', __FILE__)
|
2017-12-01 10:41:50 -05:00
|
|
|
require File.expand_path('../shared/sprintf', __FILE__)
|
|
|
|
require File.expand_path('../shared/sprintf_encoding', __FILE__)
|
2017-05-07 08:04:49 -04:00
|
|
|
|
|
|
|
describe "Kernel#sprintf" do
|
2017-12-01 10:41:50 -05:00
|
|
|
it_behaves_like :kernel_sprintf, -> (format, *args) {
|
|
|
|
sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 08:04:49 -04:00
|
|
|
|
2017-12-01 10:41:50 -05:00
|
|
|
it_behaves_like :kernel_sprintf_encoding, -> (format, *args) {
|
|
|
|
sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "Kernel.sprintf" do
|
2017-12-01 10:41:50 -05:00
|
|
|
it_behaves_like :kernel_sprintf, -> (format, *args) {
|
|
|
|
Kernel.sprintf(format, *args)
|
|
|
|
}
|
|
|
|
|
|
|
|
it_behaves_like :kernel_sprintf_encoding, -> (format, *args) {
|
|
|
|
Kernel.sprintf(format, *args)
|
|
|
|
}
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|