Sha256: 3a4a3ea6e8375d6d7e92a528e8d0acda339c41657a5f805be3028270d3ef9bdf
Contents?: true
Size: 762 Bytes
Versions: 17
Compression:
Stored size: 762 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') describe Attributor::Regexp do subject(:type) { Attributor::Regexp } it 'it is not Dumpable' do expect(type.new.is_a?(Attributor::Dumpable)).not_to be(true) end its(:native_type) { should be(::Regexp) } its(:example) { should be_a(::String) } its(:family) { should eq 'string' } context '.load' do let(:value) { nil } it 'returns nil for nil' do expect(type.load(nil)).to be(nil) end context 'for incoming String values' do { 'foo' => /foo/, '^pattern$' => /^pattern$/ }.each do |value, expected| it "loads '#{value}' as #{expected.inspect}" do expect(type.load(value)).to eq(expected) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems