Sha256: f43683a06b0fef3c0725b26378e0280f2e55e0c7cd710ac29b60720d6986c524

Contents?: true

Size: 561 Bytes

Versions: 115

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

require_relative '../lib/zold/gem'
require 'webmock/minitest'
require 'minitest/autorun'

class TestGem < Zold::Test
  def test_last_version
    version = (1..3).map { rand(9).to_s } .join('.')
    stub_request(:get, 'https://rubygems.org/api/v1/versions/zold/latest.json').to_return(
      status: 200,
      body: "{\"version\": \"#{version}\"}"
    )
    assert_equal(version, Zold::Gem.new.last_version)
  end

  def test_last_version_live
    WebMock.allow_net_connect!
    assert(!Zold::Gem.new.last_version.nil?)
  end
end

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
zold-0.29.21 test/test_gem.rb
zold-0.29.20 test/test_gem.rb
zold-0.26.19 test/test_gem.rb
zold-0.26.18 test/test_gem.rb
zold-0.26.17 test/test_gem.rb
zold-0.26.16 test/test_gem.rb
zold-0.26.15 test/test_gem.rb
zold-0.26.14 test/test_gem.rb
zold-0.26.13 test/test_gem.rb
zold-0.26.12 test/test_gem.rb
zold-0.26.11 test/test_gem.rb
zold-0.26.10 test/test_gem.rb
zold-0.26.9 test/test_gem.rb
zold-0.26.8 test/test_gem.rb
zold-0.26.7 test/test_gem.rb
zold-0.24.6 test/test_gem.rb
zold-0.24.5 test/test_gem.rb
zold-0.24.4 test/test_gem.rb
zold-0.24.3 test/test_gem.rb
zold-0.24.2 test/test_gem.rb