Sha256: 075d74541b7140f3984ed5551e6c7e4b719901cf517dfa6ba074b59e15aad9c5
Contents?: true
Size: 560 Bytes
Versions: 2
Compression:
Stored size: 560 Bytes
Contents
describe 'User::Role' do context 'with mapped entries method' do let(:enum) { User::Role } before { default_user_roles } describe '.keys' do it 'returns all the keys' do expect(enum.keys).to eq [:admin, :editor, :author, :user] end end describe '.values' do it 'returns all the values' do expect(enum.values).to eq [0, 1, 2, 3] end end describe '.labels' do it 'returns all the labels' do expect(enum.labels).to eq %w(Admin Editor Author User) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_attr_enum-0.2.0 | test/dummy/spec/mapped_entries_methods_spec.rb |
rails_attr_enum-0.1.1 | test/dummy/spec/mapped_entries_methods_spec.rb |