Sha256: 5d4cd6766b189f6af28f2c923d66c88918acd18df524ca95fac66f8851f5de7a
Contents?: true
Size: 465 Bytes
Versions: 6
Compression:
Stored size: 465 Bytes
Contents
require 'spec_helper' describe Conjur::Cast do let!(:object) { Object.new.tap do |obj| class << obj include Conjur::Cast end end } it 'String casts to itself' do expect(object.send(:cast_to_id, "foo")).to eq("foo") end it 'Id casts to to_s' do expect(object.send(:cast_to_id, "foo")).to eq("foo") end it 'Array casts via #join' do expect(object.send(:cast_to_id, [ "foo", "bar" ])).to eq("foo:bar") end end
Version data entries
6 entries across 6 versions & 1 rubygems