Sha256: db245dd59fe41e1bd6eb0290ae7ced8f968a701443c08105bc14a3f7f8bf168a

Contents?: true

Size: 598 Bytes

Versions: 3

Compression:

Stored size: 598 Bytes

Contents

require "spec_helper"
require "ribose/cli/rcfile"

RSpec.describe Ribose::CLI::RCFile do
  describe ".set" do
    it "allows us to set API Token and User Email" do
      api_token = "SECRET_TOKEN"
      user_email = "user-one@example.com"
      allow(File).to receive(:expand_path).and_return(fixtures_path)

      Ribose::CLI::RCFile.set(token: api_token, email: user_email)

      expect(Ribose::CLI::RCFile.api_token).to eq(api_token)
      expect(Ribose::CLI::RCFile.user_email).to eq(user_email)
    end
  end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ribose-cli-0.3.2 spec/ribose/cli/rcfile_spec.rb
ribose-cli-0.2.1 spec/ribose/cli/rcfile_spec.rb
ribose-cli-0.2.0 spec/ribose/cli/rcfile_spec.rb