We can now replace processing in #formatted_value by #to_s calls

This commit is contained in:
gregoirenovel 2018-12-28 15:58:17 +01:00
parent f27717ab23
commit c00aac2f80
6 changed files with 14 additions and 18 deletions

View file

@ -9,13 +9,13 @@ describe Champs::CheckboxChamp do
context 'when the value is on' do
let(:value) { 'on' }
it { is_expected.to eq('oui') }
it { is_expected.to eq('Oui') }
end
context 'when the value is off' do
let(:value) { 'off' }
it { is_expected.to eq('non') }
it { is_expected.to eq('Non') }
end
end
end

View file

@ -5,19 +5,19 @@ describe Champs::YesNoChamp do
context 'when the value is false' do
let(:value) { "false" }
it { is_expected.to eq("non") }
it { is_expected.to eq("Non") }
end
context 'when the value is true' do
let(:value) { "true" }
it { is_expected.to eq("oui") }
it { is_expected.to eq("Oui") }
end
context 'when the value is nil' do
let(:value) { nil }
it { is_expected.to eq("non") }
it { is_expected.to eq("Non") }
end
end
end