Sha256: 9bd46b730986c9b98c4fb3dbcffca2b930f62b2a3e55431f3de2a699c81c99dc

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 KB

Contents

require_relative '../../../test_helper'

module Troo
  module CLI
    describe Refresh do
      let(:described_class) { Refresh }

      describe '#all' do
        before { Retrieval::Remote.stubs(:fetch).returns([]) }

        subject { capture_io { described_class.new.all }.join }

        it { subject.must_be_instance_of(String) }

        it 'returns the output of the command' do
          subject.must_match(/Cannot refresh all local data/)
        end
      end

      describe '#board' do
        subject { capture_io { described_class.new.board }.join }

        it { subject.must_be_instance_of(String) }

        it 'returns the output of the command' do
          subject.must_match(/Board cannot be found/)
        end
      end

      describe '#card' do
        subject { capture_io { described_class.new.card }.join }

        it { subject.must_be_instance_of(String) }

        it 'returns the output of the command' do
          subject.must_match(/Card cannot be found/)
        end
      end

      describe '#list' do
        subject { capture_io { described_class.new.list }.join }

        it { subject.must_be_instance_of(String) }

        it 'returns the output of the command' do
          subject.must_match(/List cannot be found/)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
troo-0.0.15 test/lib/troo/cli/refresh_test.rb
troo-0.0.14 test/lib/troo/cli/refresh_test.rb
troo-0.0.13 test/lib/troo/cli/refresh_test.rb