File: version_spec.rb

package info (click to toggle)
ruby-jwt 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 876 kB
  • sloc: ruby: 5,550; makefile: 4
file content (30 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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