Sha256: 0a836cc9a22958c95ea0a311236db76b59aeb3e9941fd6a1596c84b327ac2625
Contents?: true
Size: 860 Bytes
Versions: 2
Compression:
Stored size: 860 Bytes
Contents
module TFA describe ShowCommand do subject { ShowCommand.new(storage) } let(:storage) { Storage.new(filename: SecureRandom.uuid) } describe "#run" do context "when looking up the secret for a specific key" do it "retrieves the secret associated with the key given" do secret = SecureRandom.uuid storage.save('production', secret) result = subject.run(['production']) expect(result).to eql(secret) end end context "when a specific name is not given" do it "returns all the secrets" do storage.save('development', "1") storage.save('staging', "2") storage.save('production', "3") expect(subject.run([])).to eql([{"development" => "1"}, { "staging" => "2" }, { "production" => "3" }]) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tfa-0.0.8 | spec/lib/show_command_spec.rb |
tfa-0.0.7 | spec/lib/show_command_spec.rb |