Sha256: 9568e36d9edfea13a3a35b26222f808d2b762cbeec1729a17392d0ed435d054e
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
describe Pipio::AliasRegistry do it 'keeps track of aliases' do alias_registry['My Cool Alias'] = 'screen_name88' expect(alias_registry['My Cool Alias']).to eq('screen_name88') end it 'finds aliases even when they are queried with an action' do alias_registry['My Cool Alias'] = 'screen_name88' expect(alias_registry['***My Cool Alias']).to eq('screen_name88') end it 'downcases screen names' do alias_registry['alias'] = 'UPCASE' expect(alias_registry['alias']).to eq('upcase') end it 'removes space from screen names' do alias_registry['alias'] = 'a space' expect(alias_registry['alias']).to eq('aspace') end it 'takes a default' do alias_registry = Pipio::AliasRegistry.new('default_name') expect(alias_registry['alias']).to eq('default_name') end it 'normalizes the default' do alias_registry = Pipio::AliasRegistry.new('DEFAULT NAME') expect(alias_registry['alias']).to eq('defaultname') end def alias_registry @alias_registry ||= Pipio::AliasRegistry.new('default') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pipio-0.0.2 | spec/pipio/alias_registry_spec.rb |
pipio-0.0.1 | spec/pipio/alias_registry_spec.rb |