require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerCompany < Test::Unit::TestCase
  def setup
    @tester = Faker::Company
  end

  def test_duns_number
    assert @tester.duns_number.match(/\d\d-\d\d\d-\d\d\d\d/)
  end

  require "open-uri"
  def test_logo
    open("#{ @tester.logo }") do |f|
	  assert f.readline.include?("GIF")
	end
  end
end
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerCompany < Test::Unit::TestCase
  def setup
    @tester = Faker::Company
  end

  def test_duns_number
    assert @tester.duns_number.match(/\d\d-\d\d\d-\d\d\d\d/)
  end

  def test_logo
	  assert @tester.logo.match(%r{http://www.biz-logo.com/examples/\d+\.gif})
  end
end

Stop fetching images during test
Stop fetching images during test
