Sha256: b7a276c8b85250d94e1a1e0df62a238070b687a9a3857a9a7592b75351771cb6

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

require File.dirname(File.dirname(__FILE__)) + '/spec_helper.rb'

describe Metadatum do
 it 'defaults to be a drop-down' do
   Metadatum.new.drop_down?.should be_true
 end
 it 'can have choices specified' do
   Metadatum.new { choices %w{bob frank}}.choices.should eql ['bob','frank']
 end
 it 'validates on choices' do
   m=Metadatum.new { choices %w{bob frank}}
   m.value 'bob'
   m.should be_valid
   m.value 'mark'
   m.should_not be_valid
 end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
amee-data-abstraction-2.1.1 spec/amee-data-abstraction/metadatum_spec.rb
amee-data-abstraction-2.1.0 spec/amee-data-abstraction/metadatum_spec.rb
amee-data-abstraction-1.2.0 spec/amee-data-abstraction/metadatum_spec.rb
amee-data-abstraction-2.0.0 spec/amee-data-abstraction/metadatum_spec.rb
amee-data-abstraction-1.1.0 spec/amee-data-abstraction/metadatum_spec.rb
amee-data-abstraction-1.0.0 spec/amee-data-abstraction/metadatum_spec.rb