Sha256: c0865f89b7edc4f9a47028d1fddb291de9c76c6a1891a008d339bd85141fac96

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

require "minitest/autorun"
require "latest"

class TestGem < MiniTest::Unit::TestCase
  
  def test_should_fetch_on_initialize
    gem = ::Latest::Gem.new("rake")
    assert_equal Hash, gem.attributes.class
    assert_equal "rake", gem.attributes["name"]
  end
  
  def test_raise_error_when_gem_is_not_found
    assert_raises Latest::GemNotFoundError do
      ::Latest::Gem.new("some-gem-that-probably-wont-exist-2")
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
latest-0.1.0 test/test_gem.rb