Sha256: 80558a8e6810bbbf551dfe379186d293878a6ce4c46a6cdba05d113f041f1bc5
Contents?: true
Size: 1.52 KB
Versions: 2
Compression:
Stored size: 1.52 KB
Contents
require 'spec_helper' module DistribBuilder module Versioner describe VersionProcessor do let(:processor) { described_class.new([1,2,3,4]) } it "does to be" do expect( VersionProcessor.new([]) ).to be end it "does return version's hash with names" do expect( processor.versions_hash ).to eq({ major: 1, minor: 2, patch: 3, build: 4 }) end it "does return 1.2.3" do expect( processor.only_version ).to eq("1.2.3") end it "does return 1.2.3.4" do expect( processor.full_version ).to eq("1.2.3.4") end it "does up build (mutate)" do expect( processor.build ).to eq(4) processor.build_up! expect( processor.build ).to eq(5) end it "does down build (mutate)" do expect( processor.build ).to eq(4) processor.build_down! expect( processor.build ).to eq(3) end it "does not down build if build == 0" do processor.build = 0 expect( processor.build ).to eq(0) processor.build_down! expect( processor.build ).to eq(0) end it "does setup build (mutate)" do processor.build = 5 expect( processor.build ).to eq(5) processor.setup_build!(12) expect( processor.build ).to eq(12) end it "does setup version (mutate)" do expect( processor.only_version ).to eq("1.2.3") processor.setup_version!("4.5.6") expect( processor.only_version ).to eq("4.5.6") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
distrib_builder-0.0.3 | spec/lib/distrib_builder/versioner/version_processor_spec.rb |
distrib_builder-0.0.2 | spec/lib/distrib_builder/versioner/version_processor_spec.rb |