Sha256: 085cc631c7784c07403c13ad485d9469206a0a78bb2efdb7c8287365d3d1e562

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'

describe Evrone::CI::Router::Middleware::FetchCommitInfo do
  let(:build)       { create :build }
  let(:env)         { OpenStruct.new build: build, scm: scm }
  let(:app)         { ->(_) { 0 } }
  let(:commit_info) { 'commit_info' }
  let(:scm)         { 'scm' }
  subject { described_class.new(app).call env }

  before do
    mock(scm).commit_info { commit_info }
  end

  it { should eq 0 }

  it "should assign commit info to build" do
    subject
    expect(build.commit_info).to eq commit_info
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evrone-ci-router-0.2.0.pre0 spec/lib/middleware/fetch_commit_info_spec.rb