Sha256: 628c81b4ec913b9e40f206f6094784a1ef3d5ecb8345b8006d4b64953f1f5b3d

Contents?: true

Size: 451 Bytes

Versions: 6

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

shared_examples 'a result that is type cast' do |types|
  types.each do |type, clazz|
    context "with #{type} type" do
      let(:type) { type }

      it do
        expect(cast).to be_a(clazz)
      end
    end
  end
end

shared_examples 'casts basic types' do
  it_behaves_like 'a result that is type cast',
                  integer: Integer,
                  float:   Float,
                  string:  String
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/support/shared_examples/wrapper.rb
arstotzka-1.6.1 spec/support/shared_examples/wrapper.rb
arstotzka-1.6.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.5.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.4.4 spec/support/shared_examples/wrapper.rb
arstotzka-1.4.3 spec/support/shared_examples/wrapper.rb