Sha256: 425a6289f47f08b67f2e8dbfd1038f4e1e45f1013e429498c6fe9d6317f589c4
Contents?: true
Size: 492 Bytes
Versions: 8
Compression:
Stored size: 492 Bytes
Contents
# frozen_string_literal: false require 'spec_helper' describe 'yard Sinclair::Caster::ClassMethods' do let(:my_caster) { Class.new(superclass) } let(:superclass) do Class.new(Sinclair::Caster) do cast_with(:string, :to_s) end end describe '.master_caster!' do it 'Making a class to be a master caster' do expect(my_caster.cast(10, :string)).to eq('10') my_caster.master_caster! expect(my_caster.cast(10, :string)).to eq(10) end end end
Version data entries
8 entries across 8 versions & 1 rubygems