summaryrefslogtreecommitdiff
path: root/spec/unit/cli/pull_spec.rb
blob: 9a3d8e882440d51f1e0a96da2b37a1d7d49ddd85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

RSpec.describe Spandx::Cli::Commands::Pull do
  subject { described_class.new(options) }

  let(:options) { {} }

  describe '#execute' do
    let(:output) { StringIO.new }

    it 'executes `spandx pull` command successfully' do
      subject.execute(output: output)

      expected = <<~OUTPUT
        Updating https://github.com/spandx/cache.git...
        Updating https://github.com/spandx/rubygems-cache.git...
        Updating https://github.com/spdx/license-list-data.git...
        OK
      OUTPUT

      expect(output.string).to eq(expected)
    end
  end
end