Sha256: b49816ce4d2f978517c2d7eabe5a074e048fc9507cbb7c5ddde265fcb774d6c5

Contents?: true

Size: 448 Bytes

Versions: 13

Compression:

Stored size: 448 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

13 entries across 13 versions & 1 rubygems

Version Path
arstotzka-1.4.2 spec/support/shared_examples/wrapper.rb
arstotzka-1.4.1 spec/support/shared_examples/wrapper.rb
arstotzka-1.4.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.3.2 spec/support/shared_examples/wrapper.rb
arstotzka-1.3.1 spec/support/shared_examples/wrapper.rb
arstotzka-1.3.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.2.4 spec/support/shared_examples/wrapper.rb
arstotzka-1.2.3 spec/support/shared_examples/wrapper.rb
arstotzka-1.2.2 spec/support/shared_examples/wrapper.rb
arstotzka-1.2.1 spec/support/shared_examples/wrapper.rb
arstotzka-1.2.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.1.0 spec/support/shared_examples/wrapper.rb
arstotzka-1.0.4 spec/support/shared_examples/wrapper.rb