Sha256: 15e2b4985cc85467c6ee0cda29aed1ff2ca59a17d0c22b9dd1d5e9f0be6a1249
Contents?: true
Size: 621 Bytes
Versions: 19
Compression:
Stored size: 621 Bytes
Contents
require 'spec_helper' module Finitio describe BuiltinType, "dress" do let(:type){ BuiltinType.new(Integer, 'int') } subject{ type.dress(arg) } context 'with an Integer' do let(:arg){ 12 } it{ should be(arg) } end context 'with a Float' do let(:arg){ 12.0 } subject{ type.dress(arg) rescue $! } it 'should raise an Error' do expect(subject).to be_a(TypeError) expect(subject.message).to eq("Invalid int `12.0`") end it 'should have no location' do expect(subject.location).to eq('') end end end end
Version data entries
19 entries across 19 versions & 1 rubygems