Sha256: 806b6c853e00117d4689d07bde38838685d0ee7e614e11cc156bd6fbd19d0851

Contents?: true

Size: 994 Bytes

Versions: 15

Compression:

Stored size: 994 Bytes

Contents

require(KnapsackPro.root + '/lib/knapsack_pro/formatters/time_tracker')

describe KnapsackPro::Formatters::TimeTrackerFetcher do
  describe '.unexecuted_test_files' do
    subject { described_class.unexecuted_test_files(scheduled_paths) }

    context 'when the time tracker formatter not found' do
      let(:scheduled_paths) { ['a_spec.rb'] }

      it do
        expect(subject).to eq []
      end
    end

    context 'when the time tracker formatter is found' do
      let(:time_tracker) { instance_double(KnapsackPro::Formatters::TimeTracker) }
      let(:scheduled_paths) { ['a_spec.rb', 'b_spec.rb'] }
      let(:unexecuted_test_files) { double(:unexecuted_test_files) }

      before do
        expect(described_class).to receive(:call).and_return(time_tracker)
        expect(time_tracker).to receive(:unexecuted_test_files).with(scheduled_paths).and_return(unexecuted_test_files)
      end

      it do
        expect(subject).to eq unexecuted_test_files
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
knapsack_pro-7.13.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.12.1 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.12.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.11.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.10.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.9.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.8.2 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.8.1 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.8.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.7.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.6.2 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.6.1 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.6.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.1.0 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb
knapsack_pro-7.0.1 spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb