Sha256: 70e7484394e6aac2027881f3ca7a14a5068fed7883b5d15fbe756d9932a28229

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'spec_helper'

RSpec.describe Examples::SchemaBuilder, type: :integration do
  types = %w(array boolean integer null number object string)

  types.each do |type|
    describe "##{ type }" do
      let(:klass){ "JSON::SchemaBuilder::#{ type.classify }".constantize }

      it "should register #{ type } type" do
        expect(subject.types[type.to_sym]).to be klass
      end

      it "should define a #{ type } method" do
        expect(subject).to respond_to type.to_sym
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json-schema_builder-0.0.1 spec/integration/schema_builder_spec.rb