Sha256: 539f8729af7d53e307883eecb188ee5c55c9655695c09c101ac2fdb99c7c5652
Contents?: true
Size: 861 Bytes
Versions: 4
Compression:
Stored size: 861 Bytes
Contents
require 'spec_helper' describe Danica::Wrapper::Number do let(:value) { 10 } subject { described_class.new(value) } it_behaves_like 'an object that respond to basic_methods' it_behaves_like 'an object with basic operation' describe '#valued?' do context 'when value is present' do it { expect(subject.valued?).to be_truthy } end context 'when value is not present' do let(:value) { false } it { expect(subject.valued?).to be_falsey } end end describe '#to_f' do it 'returns the float of value' do expect(subject.to_f).to eq(10) end it { expect(subject.to_f).to be_a(Float) } end describe '#to_tex' do it_behaves_like 'a method that display the numeric value', :to_tex end describe '#to_gnu' do it_behaves_like 'a method that display the numeric value', :to_gnu end end
Version data entries
4 entries across 4 versions & 1 rubygems