Sha256: 33d6ac76beea21cc67fe734397e6b05ddba83aa8282c3050edb28111d8bbf3a4
Contents?: true
Size: 1 KB
Versions: 3
Compression:
Stored size: 1 KB
Contents
require 'helper' class TestGemwhois < Test::Unit::TestCase context 'Whois for found gem' do setup do @gem = 'httparty' stub_gem(@gem) @command = Gem::Commands::WhoisCommand.new @command.handle_options([@gem]) end should "work" do output = <<-STR.unindent gem name: httparty owners: John Nunemaker, Sandro Turriate info: Makes http fun! Also, makes consuming restful web services dead easy. version: 0.5.2 downloads: 40707 STR assert_output(output) { @command.execute } end end context "Whois for missing gem" do setup do @gem = 'missing' stub_gem(@gem, :status => ["404", "Not Found"]) @command = Gem::Commands::WhoisCommand.new @command.handle_options([@gem]) end should "work" do output = <<-STR.unindent Gem not found. It will be mine. Oh yes. It will be mine. *sinister laugh* STR assert_output(output) { @command.execute } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gemwhois-0.2.1 | test/test_gemwhois.rb |
gemwhois-0.2 | test/test_gemwhois.rb |
gemwhois-0.1 | test/test_gemwhois.rb |