Sha256: c17b67eb33945f4ea2a1b49554a055b42dee302c44e94a0948d7cfb3e42f3bdf

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), "helper")


describe CiStatus::CruiseControl do

  before  { stub_request(:get, "http://example.com/cc.xml").to_return(:body => cc_fixture) }
  subject { CiStatus::CruiseControl.new("http://example.com/cc.xml") }

  it "surfaces the input URL" do
    assert_equal "http://example.com/cc.xml", subject.url
  end

  describe "#projects" do
    it "returns the expected projects" do
      assert_equal 3, subject.projects.size

      project = subject.projects.first

      assert_equal "https://jenkins.example.com/job/Analytics/", project.url
      assert_equal "Analytics", project.name
      assert_equal "Success", project.status
      assert project.success?
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ci_status-0.1.0 test/test_cruise_control.rb