Sha256: f6831f2d46a4772e288d4f1cab277870834178ab2f941d859bf7328333576784

Contents?: true

Size: 473 Bytes

Versions: 9

Compression:

Stored size: 473 Bytes

Contents

require "spec_helper"

RSpec.describe Digicert::CLI::RCFile do
  describe ".set_key" do
    it "writes the api key to the configuration file" do
      secret_api_key = "super_secret_key"
      allow(File).to receive(:expand_path).and_return(fixtures_path)

      Digicert::CLI::RCFile.set_key(secret_api_key)

      expect(Digicert::CLI::RCFile.api_key).to eq(secret_api_key)
    end
  end

  def fixtures_path
    File.expand_path("../../../fixtures", __FILE__)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
digicert-cli-1.0.0 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.5.2 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.5.1 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.5.0 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.4.2 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.4.1 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.4.0 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.3.0 spec/digicert/cli/rcfile_spec.rb
digicert-cli-0.2.0 spec/digicert/cli/rcfile_spec.rb