18 lines
539 B
Ruby
18 lines
539 B
Ruby
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
# frozen_string_literal: true
|
|
|
|
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
|