2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-06-09 11:54:29 +02:00
|
|
|
describe Logic::Constant do
|
|
|
|
include Logic
|
|
|
|
|
|
|
|
describe '#type' do
|
|
|
|
it { expect(empty.type).to eq(:empty) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#errors' do
|
|
|
|
it { expect(empty.errors).to eq(['empty']) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#==' do
|
|
|
|
it { expect(empty).to eq(empty) }
|
|
|
|
it { expect(empty).not_to eq(constant(true)) }
|
|
|
|
end
|
2022-06-27 12:32:00 +02:00
|
|
|
|
|
|
|
describe '#to_s' do
|
|
|
|
it { expect(empty.to_s).to eq('un membre vide') }
|
|
|
|
end
|
2023-01-04 11:10:10 +01:00
|
|
|
|
|
|
|
describe '#sources' do
|
|
|
|
it { expect(empty.sources).to eq([]) }
|
|
|
|
end
|
2022-06-09 11:54:29 +02:00
|
|
|
end
|