14 lines
470 B
Ruby
14 lines
470 B
Ruby
|
require 'rails_helper'
|
||
|
|
||
|
module VNS
|
||
|
RSpec.describe Engine do
|
||
|
describe '.sequence' do
|
||
|
it { expect(described_class.sequence([])).to eq([]) }
|
||
|
it { expect(described_class.sequence([1])).to eq([1]) }
|
||
|
it { expect(described_class.sequence([1, 2])).to eq([1, 2, 1]) }
|
||
|
it { expect(described_class.sequence([1, 2, 3])).to eq([1, 2, 3, 2, 1]) }
|
||
|
it { expect(described_class.sequence([1, 2, 3, 4])).to eq([1, 2, 3, 4, 3, 2, 1]) }
|
||
|
end
|
||
|
end
|
||
|
end
|