Sha256: 4c1593d0c7f36dd4f7d3b38650b194a4483ffbf3a4be7cb1c973c76da6cceeb8
Contents?: true
Size: 696 Bytes
Versions: 14
Compression:
Stored size: 696 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Axiom::Types::Boolean, '.infer' do subject { object.infer(arg) } let(:object) { described_class } context 'when the argument is the type object' do let(:arg) { object } it { should be(object) } end context 'when the argument is ::TrueClass' do let(:arg) { ::TrueClass } it { should be(object) } end context 'when the argument is ::FalseClass' do let(:arg) { ::FalseClass } it { should be(object) } end context 'when the argument is nil' do let(:arg) { nil } it { should be_nil } end context 'when the argument is not nil' do let(:arg) { 1 } it { should be_nil } end end
Version data entries
14 entries across 12 versions & 4 rubygems