Sha256: f1f182a8c13be3da58587f88530b0dfa6b89aac98373453a11fc7c6b45f9161f
Contents?: true
Size: 744 Bytes
Versions: 10
Compression:
Stored size: 744 Bytes
Contents
require 'spec_helper' describe Spectifly::Json::Field do describe '#to_h' do it 'returns hash format of field' do expected = { :a_field => { :type => 'people', :multiple => false, :required => true, :description => "People who don't worry about longevity", :example => 'children', :validations => ['Must be young', 'Must love eating mud'] } } field = described_class.new('A Field*', { 'Description' => "People who don't worry about longevity", 'Type' => 'people', 'Example' => 'children', 'Validations' => ['Must be young', 'Must love eating mud'] }) field.to_h.should == expected end end end
Version data entries
10 entries across 10 versions & 1 rubygems