Use example.com as domain in tests
This commit is contained in:
parent
4f476d7066
commit
9a554f5f4b
@ -111,19 +111,19 @@ class DependencyCollectorTests < Test::Unit::TestCase
|
||||
|
||||
def test_resource_dep_git_url
|
||||
resource = Resource.new
|
||||
resource.url("git://github.com/foo/bar.git")
|
||||
resource.url("git://example.com/foo/bar.git")
|
||||
assert_instance_of GitDependency, @d.add(resource)
|
||||
end
|
||||
|
||||
def test_resource_dep_gzip_url
|
||||
resource = Resource.new
|
||||
resource.url("http://foo.com/bar.tar.gz")
|
||||
resource.url("http://example.com/foo.tar.gz")
|
||||
assert_nil @d.add(resource)
|
||||
end
|
||||
|
||||
def test_resource_dep_xz_url
|
||||
resource = Resource.new
|
||||
resource.url("http://foo.com/bar.tar.xz")
|
||||
resource.url("http://example.com/foo.tar.xz")
|
||||
assert_equal Dependency.new("xz", [:build]), @d.add(resource)
|
||||
end
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ require 'download_strategy'
|
||||
class ResourceDouble
|
||||
attr_reader :url, :specs
|
||||
|
||||
def initialize(url="http://foo.com/bar.tar.gz", specs={})
|
||||
def initialize(url="http://example.com/foo.tar.gz", specs={})
|
||||
@url = url
|
||||
@specs = specs
|
||||
end
|
||||
@ -38,7 +38,7 @@ end
|
||||
|
||||
class VCSDownloadStrategyTests < Test::Unit::TestCase
|
||||
def setup
|
||||
@resource = ResourceDouble.new("http://foo.com/bar")
|
||||
@resource = ResourceDouble.new("http://example.com/bar")
|
||||
@strategy = VCSDownloadStrategy
|
||||
end
|
||||
|
||||
@ -68,7 +68,7 @@ class DownloadStrategyDetectorTests < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_detect_git_download_startegy
|
||||
@d = DownloadStrategyDetector.detect("git://foo.com/bar.git")
|
||||
@d = DownloadStrategyDetector.detect("git://example.com/foo.git")
|
||||
assert_equal GitDownloadStrategy, @d
|
||||
end
|
||||
|
||||
|
||||
@ -155,21 +155,21 @@ class FormulaTests < Test::Unit::TestCase
|
||||
def test_formula_spec_integration
|
||||
f = Class.new(Formula) do
|
||||
homepage 'http://example.com'
|
||||
url 'file:///foo.com/testball-0.1.tbz'
|
||||
mirror 'file:///foo.org/testball-0.1.tbz'
|
||||
url 'http://example.com/test-0.1.tbz'
|
||||
mirror 'http://example.org/test-0.1.tbz'
|
||||
sha1 TEST_SHA1
|
||||
|
||||
head 'https://github.com/Homebrew/homebrew.git', :tag => 'foo'
|
||||
head 'http://example.com/test.git', :tag => 'foo'
|
||||
|
||||
devel do
|
||||
url 'file:///foo.com/testball-0.2.tbz'
|
||||
mirror 'file:///foo.org/testball-0.2.tbz'
|
||||
url 'http://example.com/test-0.2.tbz'
|
||||
mirror 'http://example.org/test-0.2.tbz'
|
||||
sha256 TEST_SHA256
|
||||
end
|
||||
|
||||
bottle { sha1 TEST_SHA1 => bottle_tag }
|
||||
|
||||
def initialize(name="spec_test_ball", path=nil)
|
||||
def initialize(name="test", path=nil)
|
||||
super
|
||||
end
|
||||
end.new
|
||||
|
||||
@ -55,7 +55,7 @@ class ResourceTests < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_version_from_url
|
||||
@resource.url('http://foo.com/bar-1.0.tar.gz')
|
||||
@resource.url('http://example.com/foo-1.0.tar.gz')
|
||||
assert_version_equal '1.0', @resource.version
|
||||
assert @resource.version.detected_from_url?
|
||||
end
|
||||
@ -68,7 +68,7 @@ class ResourceTests < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_version_from_tag
|
||||
@resource.url('http://foo.com/bar-1.0.tar.gz', :tag => 'v1.0.2')
|
||||
@resource.url('http://example.com/foo-1.0.tar.gz', :tag => 'v1.0.2')
|
||||
assert_version_equal '1.0.2', @resource.version
|
||||
assert @resource.version.detected_from_url?
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user