Sha256: 2ae6d39263cad5e962f365ac022c45a2a03a732841333280416ec6ee0dd6a5cf

Contents?: true

Size: 481 Bytes

Versions: 8

Compression:

Stored size: 481 Bytes

Contents

require "spec_helper"

module Storey
  describe SetsEnvPassword, ".with" do

    before do
      ENV["PGPASSWORD"] = "somethingelse"
    end

    it "sets the env password found in the database config" do
      described_class.with("asd")
      expect(ENV["PGPASSWORD"]).to eq "asd"
    end

    context "password is an integer" do
      it "sets the password as a string" do
        described_class.with(1)
        expect(ENV["PGPASSWORD"]).to eq "1"
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
storey-2.2.0 spec/storey/sets_env_password_spec.rb
storey-2.1.2 spec/storey/sets_env_password_spec.rb
storey-2.1.1 spec/storey/sets_env_password_spec.rb
storey-2.1.0 spec/storey/sets_env_password_spec.rb
storey-2.0.2 spec/storey/sets_env_password_spec.rb
storey-2.0.1 spec/storey/sets_env_password_spec.rb
storey-2.0.0 spec/storey/sets_env_password_spec.rb
storey-1.0.0 spec/storey/sets_env_password_spec.rb