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