Sha256: ac375b2e6a579eede2cc0ba0545a1e7016ae33375fffd140a8239237ce4b4930

Contents?: true

Size: 821 Bytes

Versions: 5

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

5 entries across 5 versions & 1 rubygems

Version Path
gem_version_check-0.2.1 spec/report_spec.rb
gem_version_check-0.2.0 spec/report_spec.rb
gem_version_check-0.1.0 spec/report_spec.rb
gem_version_check-0.0.10 spec/report_spec.rb
gem_version_check-0.0.9 spec/report_spec.rb