Sha256: 54736321e0392ae1ca58e7dd9992f3f3f6ee05e73f0d8db60c6fc1720cd2fd27
Contents?: true
Size: 744 Bytes
Versions: 2
Compression:
Stored size: 744 Bytes
Contents
require 'pr/fields' describe 'accessing fields' do let(:lookup) { PR::Fields } describe 'finding fields via constant' do specify { expect(lookup[:generic]).to eq PR::Fields::GenericField } specify { expect(lookup[:string]).to eq PR::Fields::StringField } specify { expect(lookup[:boolean]).to eq PR::Fields::BooleanField } specify { expect(lookup[:date]).to eq PR::Fields::DateField } specify { expect(lookup[:float]).to eq PR::Fields::FloatField } end describe 'extending with custom fields' do let(:my_custom_field) { double "my custom field" } it 'allows extension with a custom field' do lookup[:custom] = my_custom_field expect(lookup[:custom]).to eq my_custom_field end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pr-1.0.0 | spec/unit/pr/fields_spec.rb |
pr-0.0.7 | spec/unit/pr/fields_spec.rb |