Sha256: d6d8144b5655dd769e9ac2d86039db3842517045e2fc1303960a0333fc080d6c

Contents?: true

Size: 935 Bytes

Versions: 4

Compression:

Stored size: 935 Bytes

Contents

require 'rscm/mockit'
require 'rscm/changes_fixture'

module DamageControl
  module Publisher
    module Fixture
      include MockIt
      include RSCM::ChangesFixture

      # Creates a mock build that can be used in other publisher tests.
      def mock_build(successful)
        project = new_mock
        project.__setup(:name) {"TestProject"}
  
        setup_changes
        changesets = RSCM::ChangeSets.new
        changesets.add(@change1)
        changesets.add(@change2)
        changesets.add(@change3)
        changesets.add(@change4)
        changesets.add(@change5)
        changesets.add(@change6)
        changesets.add(@change7)
  
        build = new_mock
        build.__setup(:project) {project}
        build.__setup(:successful?) {successful}
        build.__setup(:changeset) {changesets[3]}
        build.__setup(:status_message) {successful ? "Successful" : "Failed"}
        build
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
damagecontrol-0.5.0.1392 test/damagecontrol/publisher/fixture.rb
damagecontrol-0.5.0.1391 test/damagecontrol/publisher/fixture.rb
damagecontrol-0.5.0.1393 test/damagecontrol/publisher/fixture.rb
damagecontrol-0.5.0.1404 test/damagecontrol/publisher/fixture.rb