Sha256: 4f1351d5ab4784b790e8962a98dcf4cbf6b293a9aed507ea3648c0154ad6b77a

Contents?: true

Size: 1.77 KB

Versions: 2

Compression:

Stored size: 1.77 KB

Contents

# frozen_string_literal: true

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 'Publishing itself' do
  it "Change to Chef repo folder" do
    change_repo = DeployRubygem.change_to_directory(DeployRubygem.chefrepo_path, 'git@github.com:JimboDragonGit/jimbodragon.git')
    expect(change_repo).not_to be nil
    expect(change_repo).to include DeployRubygem.chefrepo_path
  end

  it "Change to jimbo_management_site folder" do
    change_repo = DeployRubygem.change_to_directory(DeployRubygem.jimbo_management_site_path, 'git@github.com:JimboDragonGit/jimbo_management_site.git')
    expect(change_repo).not_to be nil
    expect(change_repo).to include DeployRubygem.jimbo_management_site_path
  end

  it "Change to deploy_rubygem folder" do
    change_repo = DeployRubygem.change_to_directory(DeployRubygem.deploy_rubygem_path, 'git@github.com:JimboDragonGit/deploy_rubygem.git')
    expect(change_repo).not_to be nil
    expect(change_repo).to include DeployRubygem.deploy_rubygem_path
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deploy_rubygem-0.60.0.4.ga6cf712 spec/unit_deploy_rubygem.rb
deploy_rubygem-0.60.0.3.gcd87b5b spec/unit_deploy_rubygem.rb