Sha256: 96773bc637db01b7b0499d660e1675f7fa5de6a4db8d9754b5f83486e71f6907
Contents?: true
Size: 1.23 KB
Versions: 9
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' describe PaperTrail::VERSION do describe "Constants" do subject { PaperTrail::VERSION } describe :MAJOR do it { is_expected.to be_const_defined(:MAJOR) } it { expect(subject::MAJOR).to be_a(Integer) } end describe :MINOR do it { is_expected.to be_const_defined(:MINOR) } it { expect(subject::MINOR).to be_a(Integer) } end describe :TINY do it { is_expected.to be_const_defined(:TINY) } it { expect(subject::TINY).to be_a(Integer) } end describe :PRE do it { is_expected.to be_const_defined(:PRE) } if PaperTrail::VERSION::PRE it { expect(subject::PRE).to be_instance_of(String) } end end describe :STRING do it { is_expected.to be_const_defined(:STRING) } it { expect(subject::STRING).to be_instance_of(String) } it "should join the numbers into a period separated string" do expect(subject::STRING).to eq( [subject::MAJOR, subject::MINOR, subject::TINY, subject::PRE].compact.join('.')) end end end end describe PaperTrail do describe '#version' do it { is_expected.to respond_to(:version) } it { expect(subject.version).to eq(PaperTrail::VERSION::STRING) } end end
Version data entries
9 entries across 9 versions & 1 rubygems