Sha256: c79a210dd9130977264109fc97f65338bafb28eb6aeba04c37652255acccc6ea
Contents?: true
Size: 555 Bytes
Versions: 5
Compression:
Stored size: 555 Bytes
Contents
require 'spec_helper' module Myrrha describe "Coercions#convert" do let(:graph){ Coercions.new } subject{ graph.send(:convert, "value", String, converter) } describe "when passed a proc of arity 2" do let(:converter){ lambda{|v,t| [v,t]} } it{ should eq(["value", String]) } end describe "when passed an object that respond to call" do let(:converter){ o = Object.new def o.call(arg, t); [arg, t]; end o } it{ should eq(["value", String]) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems