diff --git a/lib/jwt/version.rb b/lib/jwt/version.rb index ced5932a..113b5af6 100644 --- a/lib/jwt/version.rb +++ b/lib/jwt/version.rb @@ -12,12 +12,12 @@ def self.gem_version Gem::Version.new(VERSION::STRING) end - # @api private + # Version constants module VERSION - MAJOR = 2 - MINOR = 10 - TINY = 1 - PRE = nil + MAJOR = 3 + MINOR = 0 + TINY = 0 + PRE = 'beta1' STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') end diff --git a/spec/jwt/version_spec.rb b/spec/jwt/version_spec.rb new file mode 100644 index 00000000..e7611c6e --- /dev/null +++ b/spec/jwt/version_spec.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +RSpec.describe JWT do + describe '.gem_version' do + it 'returns the gem version' do + expect(described_class.gem_version).to eq(Gem::Version.new(JWT::VERSION::STRING)) + end + end + describe 'VERSION constants' do + it 'has a MAJOR version' do + expect(JWT::VERSION::MAJOR).to be_a(Integer) + end + + it 'has a MINOR version' do + expect(JWT::VERSION::MINOR).to be_a(Integer) + end + + it 'has a TINY version' do + expect(JWT::VERSION::TINY).to be_a(Integer) + end + + it 'has a PRE version' do + expect(JWT::VERSION::PRE).to be_a(String).or be_nil + end + + it 'has a STRING version' do + expect(JWT::VERSION::STRING).to be_a(String) + end + end +end