Sha256: c8634824f37b7f6a16edb76d58a732acfbaf14535e61bb57c7947e78760d48fd

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

# frozen_string_literal: true

require 'git-version-bump'
require 'rubygems'


RSpec.describe GVB do
  it "has a version number" do
    expect(GVB.version).not_to be nil
  end

  %w(major_version minor_version patch_version).each do |method_name|
    it "has the method #{method_name}" do
      expect(GVB.methods.include?(method_name.to_sym)).to eq(true)
    end
  end
end

RSpec.describe DeployRubygem do
  it "has a version number" do
    expect(DeployRubygem::VERSION).not_to be nil
  end

  %w(main deploy_jimbodragon change_to_directory deploy_rubygem_path chefrepo_path).each do |method_name|
    it "has the method #{method_name}" do
      expect(DeployRubygem.methods.include?(method_name.to_sym)).to eq(true)
    end
  end

  it "has pre latest version publish" do
    expect(`gem list -r deploy_rubygem`).to include("deploy_rubygem (#{Gem::Version.new("#{GVB.major_version}.#{GVB.minor_version - 1}.1")})")
  end
end

RSpec.describe 'Publish itself' do
  it "publish itself" do
    expect(DeployRubygem.main).not_to be nil
  end

  it "has pre latest version publish" do
    expect(`gem list -r deploy_rubygem`).to include("deploy_rubygem (#{Gem::Version.new("#{GVB.major_version}.#{GVB.minor_version - 1}.1")})")
  end

  it "has latest version publish" do
    expect(`gem list -r deploy_rubygem`).not_to include("deploy_rubygem (#{GVB.version}})")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deploy_rubygem-0.56.1 spec/deploy_rubygem_spec.rb