Sha256: 714d9e3a5cbd9755fc19f7f345c101ddcad9d53f4069abe42c8b8536372225d3
Contents?: true
Size: 1.24 KB
Versions: 7
Compression:
Stored size: 1.24 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
7 entries across 7 versions & 2 rubygems