Sha256: 053f9c3fa3f0ceba4bb53e165419edb777f90d49575f8795b428169866aaae7c
Contents?: true
Size: 687 Bytes
Versions: 2
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' module Finitio describe SetType, "include?" do let(:type){ SetType.new(intType) } subject{ type.include?(arg) } context 'when included on empty set' do let(:arg){ Set.new } it{ should be_true } end context 'when included on non empty set' do let(:arg){ Set.new } before do arg << 12 end it{ should be_true } end context 'when not a set' do let(:arg){ [] } it{ should be_false } end context 'when a set with non ints' do let(:arg){ Set.new } before do arg << 12 arg << "foo" end it{ should be_false } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/type/set_type/test_include.rb |
finitio-0.4.0 | spec/unit/type/set_type/test_include.rb |