spec/unit/virtus/attribute/coerce_spec.rb in virtus-0.3.0 vs spec/unit/virtus/attribute/coerce_spec.rb in virtus-0.4.0
- old
+ new
@@ -7,11 +7,11 @@
let(:options) { { :primitive => primitive, :coercion_method => coercion_method } }
let(:primitive) { stub('primitive') }
let(:coercion_method) { stub('coercion_method') }
let(:value) { mock('value', :class => value_class) }
let(:value_class) { stub('value_class') }
- let(:coercer) { mock('coercer', :send => coerced) }
+ let(:coercer) { mock('coercer', :public_send => coerced) }
let(:coerced) { stub('coerced') }
before do
Virtus::Coercion.stub(:[]).with(value_class).and_return(coercer)
end
@@ -22,9 +22,9 @@
Virtus::Coercion.should_receive(:[]).with(value_class)
subject
end
it 'asks the coercer to coerce the value' do
- coercer.should_receive(:send).with(coercion_method, value)
+ coercer.should_receive(:public_send).with(coercion_method, value)
subject
end
end