Get rid of setup_install_test method
This commit is contained in:
parent
148ebcb72e
commit
038332d8d7
@ -116,13 +116,13 @@ class PathnameExtensionTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
class PathnameInstallTests < PathnameExtensionTests
|
class PathnameInstallTests < PathnameExtensionTests
|
||||||
def setup_install_test
|
def setup
|
||||||
(@src+'a.txt').write 'This is sample file a.'
|
super
|
||||||
(@src+'b.txt').write 'This is sample file b.'
|
(@src+"a.txt").write "This is sample file a."
|
||||||
|
(@src+"b.txt").write "This is sample file b."
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_install
|
def test_install
|
||||||
setup_install_test
|
|
||||||
@dst.install @src+"a.txt"
|
@dst.install @src+"a.txt"
|
||||||
|
|
||||||
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
||||||
@ -130,7 +130,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_list
|
def test_install_list
|
||||||
setup_install_test
|
|
||||||
@dst.install [@src+"a.txt", @src+"b.txt"]
|
@dst.install [@src+"a.txt", @src+"b.txt"]
|
||||||
|
|
||||||
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
||||||
@ -138,7 +137,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_glob
|
def test_install_glob
|
||||||
setup_install_test
|
|
||||||
@dst.install Dir[@src+"*.txt"]
|
@dst.install Dir[@src+"*.txt"]
|
||||||
|
|
||||||
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
assert_predicate @dst+"a.txt", :exist?, "a.txt was not installed"
|
||||||
@ -146,7 +144,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_directory
|
def test_install_directory
|
||||||
setup_install_test
|
|
||||||
bin = @src+"bin"
|
bin = @src+"bin"
|
||||||
bin.mkpath
|
bin.mkpath
|
||||||
mv Dir[@src+"*.txt"], bin
|
mv Dir[@src+"*.txt"], bin
|
||||||
@ -157,7 +154,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_rename
|
def test_install_rename
|
||||||
setup_install_test
|
|
||||||
@dst.install @src+"a.txt" => "c.txt"
|
@dst.install @src+"a.txt" => "c.txt"
|
||||||
|
|
||||||
assert_predicate @dst+"c.txt", :exist?, "c.txt was not installed"
|
assert_predicate @dst+"c.txt", :exist?, "c.txt was not installed"
|
||||||
@ -166,7 +162,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_rename_more
|
def test_install_rename_more
|
||||||
setup_install_test
|
|
||||||
@dst.install(@src+"a.txt" => "c.txt", @src+"b.txt" => "d.txt")
|
@dst.install(@src+"a.txt" => "c.txt", @src+"b.txt" => "d.txt")
|
||||||
|
|
||||||
assert_predicate @dst+"c.txt", :exist?, "c.txt was not installed"
|
assert_predicate @dst+"c.txt", :exist?, "c.txt was not installed"
|
||||||
@ -176,7 +171,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_rename_directory
|
def test_install_rename_directory
|
||||||
setup_install_test
|
|
||||||
bin = @src+"bin"
|
bin = @src+"bin"
|
||||||
bin.mkpath
|
bin.mkpath
|
||||||
mv Dir[@src+"*.txt"], bin
|
mv Dir[@src+"*.txt"], bin
|
||||||
@ -188,7 +182,6 @@ class PathnameInstallTests < PathnameExtensionTests
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_install_symlink
|
def test_install_symlink
|
||||||
setup_install_test
|
|
||||||
bin = @src+"bin"
|
bin = @src+"bin"
|
||||||
bin.mkpath
|
bin.mkpath
|
||||||
mv Dir[@src+"*.txt"], bin
|
mv Dir[@src+"*.txt"], bin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user