Sha256: 96f1b15a3c664f31d21112d9a135247500131cc7165a8e76f14c80540a8ab0c8
Contents?: true
Size: 744 Bytes
Versions: 9
Compression:
Stored size: 744 Bytes
Contents
require 'spec_helper' describe CousinRoman do it 'should have a version number' do CousinRoman::VERSION.should_not be_nil end end describe String do [:to_arabian, :to_arabian!].each do |meth| it { should respond_to(meth) } it "should call CousinRoman::Roman.#{meth} on String##{meth}" do roman = 'i' CousinRoman::Roman.should_receive(meth).with(roman).and_call_original roman.send(meth).should == 1 end end end describe Integer do [:to_roman, :to_roman!].each do |meth| it "should call CousinRoman::Arabian.#{meth} on Fixnum##{meth}" do arabian = 1 CousinRoman::Arabian.should_receive(meth).with(arabian).and_call_original arabian.send(meth).should == 'I' end end end
Version data entries
9 entries across 9 versions & 1 rubygems