Sha256: cd31683ab5b7206f678b5ebfaa1f2dc1cac88b752d46690dba4cf1d57cab7bd7

Contents?: true

Size: 1.32 KB

Versions: 16

Compression:

Stored size: 1.32 KB

Contents

require 'tmpdir'

include Rake
include Rake::Funnel::Support

describe Rake::Funnel::Tasks::SideBySideSpecs do
  before {
    Task.clear
  }

  describe 'defaults' do
    its(:name) { should == :compile }
    its(:projects) { should == %w(**/*.csproj **/*.vbproj **/*.fsproj) }
    its(:references) { should == [] }
    its(:specs) { should == %w(*Specs.cs *Tests.cs) }
    its(:enabled) { should == false }
    its(:packages) { should == [] }
  end

  describe 'execution' do
    subject {
      described_class.new do |t|
        t.projects = %w(**/*.??proj)
        t.references = %w(Ref)
        t.specs = %w(*Specs.cs **/*Specs.cs)
        t.enabled = enabled
        t.packages = %w(Package)
      end
    }

    before {
      allow(SpecsRemover).to receive(:remove)
    }

    before {
      Task[subject.name].invoke
    }

    context 'enabled' do
      let(:enabled) { true }

      it 'should use remover' do
        expect(SpecsRemover).to have_received(:remove)
            .with(projects: subject.projects,
                  references: subject.references,
                  specs: subject.specs,
                  packages: subject.packages)
      end
    end

    context 'disabled' do
      let(:enabled) { false }

      it 'should do nothing' do
        expect(SpecsRemover).not_to have_received(:remove)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rake-funnel-0.18.0 spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.17.0 spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.16.1 spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.16.0 spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.15.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.14.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.13.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.12.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.11.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.10.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.9.1.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.9.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.8.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.7.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.6.1.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb
rake-funnel-0.6.0.pre spec/rake/funnel/tasks/side_by_side_specs_spec.rb