Sha256: f3cd15c1a661d295d678beb525cbde4b33bb39ab495be55a0571a99271df5e23

Contents?: true

Size: 873 Bytes

Versions: 68

Compression:

Stored size: 873 Bytes

Contents

describe KnapsackPro::TestFileFinder do
  describe '.call' do
    let(:test_file_pattern) { double }
    let(:test_files) { double }

    subject { described_class.call(test_file_pattern) }

    before do
      test_file_finder = instance_double(described_class, call: test_files)
      expect(described_class).to receive(:new).with(test_file_pattern).and_return(test_file_finder)
    end

    it { should eq test_files }
  end

  describe '#call' do
    let(:test_file_pattern) { 'spec_fake/**{,/*/**}/*_spec.rb' }

    subject { described_class.new(test_file_pattern).call }

    it do
      should eq([
        {
          'path' => 'spec_fake/controllers/users_controller_spec.rb',
        },
        {
          'path' => 'spec_fake/models/admin_spec.rb',
        },
        {
          'path' => 'spec_fake/models/user_spec.rb',
        },
      ])
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
knapsack_pro-1.0.2 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-1.0.1 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-1.0.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.57.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.56.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.55.2 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.55.1 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.55.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.54.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.53.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.52.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.51.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.50.1 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.50.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.49.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.48.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.47.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.46.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.45.0 spec/knapsack_pro/test_file_finder_spec.rb
knapsack_pro-0.44.0 spec/knapsack_pro/test_file_finder_spec.rb