Sha256: e4a478dd2afed088348341b27c4de0401fa2b4cd389d6901dd406ff0d7db6ccc

Contents?: true

Size: 821 Bytes

Versions: 7

Compression:

Stored size: 821 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

module GemVersionCheck
  describe Report do

    before do
      Project.any_instance.stubs(:report)
    end

    let(:report) do
      report = Report.new(%w(proj1, proj2))
      report.generate
      report
    end

    context "#generate" do
      it "returns array of projects" do
        report = Report.new(%w(proj1, proj2))
        report.generate.size.should == 2
      end

      it "#check_failed? returns true if at least on project failed" do
        Project.any_instance.stubs(:check_failed?).returns(true)
        report.should be_check_failed
      end

      it "#check_failed? returns false if all projects report success" do
        Project.any_instance.stubs(:check_failed?).returns(false)
        report.should_not be_check_failed
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gem_version_check-0.5.1 spec/report_spec.rb
gem_version_check-0.5.0 spec/report_spec.rb
gem_version_check-0.5.2 spec/report_spec.rb
gem_version_check-0.4.1 spec/report_spec.rb
gem_version_check-0.4.0 spec/report_spec.rb
gem_version_check-0.3.1 spec/report_spec.rb
gem_version_check-0.3.0 spec/report_spec.rb