Sha256: 976f138aa09abe1e0e70e63fe6b101d83219a614303f62073231c96d50999436
Contents?: true
Size: 492 Bytes
Versions: 10
Compression:
Stored size: 492 Bytes
Contents
require 'spec_helper' describe Virtus::Coercion::Object, '.to_string' do subject { object.to_string(value) } let(:object) { described_class } let(:value) { Object.new } context 'when the value responds to #to_str' do let(:coerced) { stub('coerced') } before do value.should_receive(:to_str).with().and_return(coerced) end it { should be(coerced) } end context 'when the value does not respond to #to_str' do it { should be(value) } end end
Version data entries
10 entries across 10 versions & 2 rubygems