Sha256: 2bcd99ea503458572597d5159e3e9eb8b44d1b47d406116ec9ea0ba11b3669da

Contents?: true

Size: 870 Bytes

Versions: 2

Compression:

Stored size: 870 Bytes

Contents

require 'spec_helper'
require 'circle/cli/project'
require 'circle/cli/repo'

module Circle::CLI
  RSpec.describe Project do
    let(:repo) {
      instance_double Repo, {
        project: 'circleci',
        user_name: 'mtchavez',
        branch_name: 'master',
        circle_token: '123'
      }
    }

    let(:project) {
      Project.new(repo)
    }

    describe '#builds', vcr: { cassette_name: 'recent_builds_branch' } do
      subject { project.builds }
      specify { is_expected.not_to be_empty }
    end

    describe '#recent_builds', vcr: { cassette_name: 'recent_builds' } do
      subject { project.recent_builds }
      specify { is_expected.not_to be_empty }
    end

    describe '#latest', vcr: { cassette_name: 'recent_builds_branch' } do
      subject { project.latest['status'] }
      specify { is_expected.to eq('success') }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
circle-cli-0.1.3 spec/circle/cli/project_spec.rb
circle-cli-0.1.2 spec/circle/cli/project_spec.rb