Sha256: 07e1076ae49ba30021facaa09bf8d0b7ae0b34c26d81abce05c92dcc0b50bdc9

Contents?: true

Size: 880 Bytes

Versions: 1

Compression:

Stored size: 880 Bytes

Contents

require 'spec_helper'

describe Pushpop::Github do
  it 'should return repository information' do
    step = Pushpop::Github.new do
      user 'keenlabs'
      repository 'pushpop'
    end
    repo = step.run
    repo.language.should == "Ruby"
  end

  it 'should register as a plugin' do
    github_job = job do
      github do
        user 'keenlabs'
        repository 'pushpop'
      end
    end
    repo, _ = github_job.run
    repo.language.should == "Ruby"
  end

  it 'should raise an error if repository is not configured' do
    expect {
      step = Pushpop::Github.new do
        user 'keenlabs'
      end
      step.run
    }.to raise_error /Please set/
  end

  it 'should raise an error if user is not configured' do
    expect {
      step = Pushpop::Github.new do
        repository 'pushpop'
      end
      step.run
    }.to raise_error /Please set/
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pushpop-github-0.1.0 spec/pushpop-github_spec.rb