Sha256: d3ecac0252904eed87607cf2d71a6f2f16ec9c7e463e9b305b6f135eada6a6ac
Contents?: true
Size: 1.24 KB
Versions: 3
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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
paper_trail-5.2.0 | spec/modules/version_number_spec.rb |
paper_trail-5.1.1 | spec/modules/version_number_spec.rb |
paper_trail-5.1.0 | spec/modules/version_number_spec.rb |