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.31.5 test/test_gem.rb
zold-0.31.4 test/test_gem.rb
zold-0.31.3 test/test_gem.rb
zold-0.31.2 test/test_gem.rb
zold-0.31.1 test/test_gem.rb
zold-0.31.0 test/test_gem.rb
zold-0.30.0 test/test_gem.rb
zold-0.29.34 test/test_gem.rb
zold-0.29.33 test/test_gem.rb
zold-0.29.32 test/test_gem.rb
zold-0.29.31 test/test_gem.rb
zold-0.29.30 test/test_gem.rb
zold-0.29.29 test/test_gem.rb
zold-0.29.28 test/test_gem.rb
zold-0.29.27 test/test_gem.rb
zold-0.29.26 test/test_gem.rb
zold-0.29.25 test/test_gem.rb
zold-0.29.24 test/test_gem.rb
zold-0.29.23 test/test_gem.rb
zold-0.29.22 test/test_gem.rb