Sha256: 9a399c7ff81287c44ec1295399a203d528ebfb9d2eaf24c62aaf0fa7eb2c1cc6

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

require_relative "../spec_helper.rb"

describe YSI::ChangeLog do
  describe "checks content of change log" do
    it "when empty" do
      engine = YSI::Engine.new
      engine.version = "1.2.3"
      a = YSI::ChangeLog.new(engine)
      expect(a.check_content("")).to eq("Can't find version 1.2.3 in change log")
    end

    it "when no version" do
      engine = YSI::Engine.new
      engine.version = "1.2.3"
      a = YSI::ChangeLog.new(engine)
      content = <<EOT
# Change log

## Version 1.0.0

* Some changes
EOT
      expect(a.check_content(content)).to eq("Can't find version 1.2.3 in change log")
    end

    it "when all info is there" do
      engine = YSI::Engine.new
      engine.version = "1.2.3"
      a = YSI::ChangeLog.new(engine)
      content = <<EOT
# Change log

## Version 1.2.3

* Some changes
EOT
      expect(a.check_content(content)).to be_nil
    end
  end

  describe "dependencies" do
    it "#needs?" do
      a = YSI::ChangeLog.new(YSI::Engine)
      expect(a.needs?(YSI::Version)).to be(true)
    end

    it "#needs" do
      a = YSI::ChangeLog.new(YSI::Engine)
      expect(a.needs).to eq([YSI::Version])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yes_ship_it-0.0.5 spec/unit/assertions/change_log_spec.rb
yes_ship_it-0.0.4 spec/unit/assertions/change_log_spec.rb
yes_ship_it-0.0.3 spec/unit/assertions/change_log_spec.rb
yes_ship_it-0.0.2 spec/unit/assertions/change_log_spec.rb