Sha256: e5754ec59d478001d2cd6c909096ea89a195a4b76b8edd12851b0bebfbee1da1
Contents?: true
Size: 667 Bytes
Versions: 1
Compression:
Stored size: 667 Bytes
Contents
require 'spec_helper' describe 'Range#to_inclusive' do subject { object.to_inclusive } let(:klass) { Range } context 'on an exclusive Range' do context 'with values that responds to #pred' do let(:object) { 1...3 } it { should be_kind_of(klass) } it 'returns an inclusive Range' do should == (1..2) end end context 'with values that do not respond to #pred' do let(:object) { 'a'...'z' } specify { expect { subject }.to raise_error(NoMethodError) } end end context 'on an inclusive Range' do let(:object) { 1..2 } it 'returns self' do should equal(object) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/range/to_inclusive_spec.rb |