Sha256: cc9db551e3e04215b76906f38a4d1edb7bf693e522e2a26ea82ddef52c4b66c6
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
require "helper" describe Travis::Surveillance::Project do before do @project = Travis::Surveillance::Project.new("dylanegan/travis-surveillance") end it "should have an owner" do @project.owner.must_equal "dylanegan" end it "should have a name" do @project.name.must_equal "travis-surveillance" end it "should have an id" do @project.id.must_equal 143690 end it "should have a description" do @project.description.must_equal "" end it "should have a status" do @project.status.must_equal 0 end describe "status" do describe "when nil" do before do @project.status = nil end it "should be building" do @project.building?.must_equal true @project.failed?.must_equal false @project.passed?.must_equal false end end describe "when zero" do before do @project.status = 0 end it "should have passed" do @project.building?.must_equal false @project.failed?.must_equal false @project.passed?.must_equal true end end describe "when one" do before do @project.status = 1 end it "should have failed" do @project.building?.must_equal false @project.failed?.must_equal true @project.passed?.must_equal false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems