Sha256: 3ab40c6aa98a3bfc6b8e2c75608674b20f3eea2236d25f6cbc8a4d8de62a4adf

Contents?: true

Size: 339 Bytes

Versions: 6

Compression:

Stored size: 339 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Granite::Form::Types::String do
  describe 'typecasting' do
    include_context 'type setup', 'String'

    specify { expect(typecast('hello')).to eq('hello') }
    specify { expect(typecast(123)).to eq('123') }
    specify { expect(typecast(nil)).to be_nil }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
granite-form-0.6.1 spec/granite/form/types/string_spec.rb
granite-form-0.6.0 spec/granite/form/types/string_spec.rb
granite-form-0.5.0 spec/granite/form/types/string_spec.rb
granite-form-0.4.0 spec/granite/form/types/string_spec.rb
granite-form-0.3.0 spec/granite/form/types/string_spec.rb
granite-form-0.2.0 spec/granite/form/types/string_spec.rb