Sha256: 758b6def3754a7b880739f99c9e4de311a998a4e628dcc868d750440bc953e04

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

require 'spec_helper'

describe Structor::Builder do
  it 'provides DSL to define structure' do
    builder = Structor::Builder.new do
      requires :node_1, :boolean
      optional :node_2, :string
      requires :node_3 do
        requires :node_4, :array
        optional :node_5, :number
      end
    end
    expect(builder.nodes.size).to eq 3
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
structor-0.0.1 spec/builder_spec.rb