spec/key_master_spec.rb in cocoapods-keys-1.7.0 vs spec/key_master_spec.rb in cocoapods-keys-2.0.0

- old
+ new

@@ -32,11 +32,26 @@ keyring = Keyring.new('500px', '/', ['ARMyKey']) keyring.instance_variable_set(:@keychain, FakeKeychain.new('ARMyKey' => 'secretkey')) key_master = KeyMaster.new(keyring) expect(key_master.name).to eq('_500pxKeys') end + it 'takes keyring with proper name returns proper Keys file' do keyring = Keyring.new('Artsy', '/', ['ARMyKey']) + keyring.instance_variable_set(:@keychain, FakeKeychain.new('ARMyKey' => 'secretkey')) + key_master = KeyMaster.new(keyring) + expect(key_master.name).to eq('ArtsyKeys') + end + + it 'takes keyring with multiple words returns proper Keys file' do + keyring = Keyring.new('ArtsyExample', '/', ['ARMyKey']) + keyring.instance_variable_set(:@keychain, FakeKeychain.new('ARMyKey' => 'secretkey')) + key_master = KeyMaster.new(keyring) + expect(key_master.name).to eq('ArtsyExampleKeys') + end + + it 'takes keyring with lowercase name returns proper Keys file' do + keyring = Keyring.new('artsy', '/', ['ARMyKey']) keyring.instance_variable_set(:@keychain, FakeKeychain.new('ARMyKey' => 'secretkey')) key_master = KeyMaster.new(keyring) expect(key_master.name).to eq('ArtsyKeys') end end