Sha256: 3fef49034ef5abfb512266ba28725d17470cf22b03b7c27f8eab2fdd14ec9621

Contents?: true

Size: 947 Bytes

Versions: 12

Compression:

Stored size: 947 Bytes

Contents

require 'spec_helper'

describe Mutant::Runner::Config, '#subjects' do
  let(:object) { described_class.run(config) }

  subject { object.subjects }

  let(:config) do
    mock(
      'Config',
      :subjects => [mutation_subject],
      :strategy => strategy,
      :reporter => reporter
    )
  end

  let(:reporter)         { mock('Reporter')         }
  let(:strategy)         { mock('Strategy')         }
  let(:mutation_subject) { mock('Mutation subject') }
  let(:subject_runner)   { mock('Subject runner')   }

  class DummySubjectRunner
    include Concord::Public.new(:config, :mutation)

    def self.run(*args); new(*args); end
  end

  before do
    strategy.stub(:setup)
    strategy.stub(:teardown)
    reporter.stub(:report => reporter)
    stub_const('Mutant::Runner::Subject', DummySubjectRunner)
  end

  it { should eql([DummySubjectRunner.new(object, mutation_subject)]) }

  it_should_behave_like 'an idempotent method'
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mutant-0.3.0.beta13 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta12 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta11 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta10 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta9 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta8 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta7 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta6 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta5 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta4 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta3 spec/unit/mutant/runner/config/subjects_spec.rb
mutant-0.3.0.beta2 spec/unit/mutant/runner/config/subjects_spec.rb