| 
									
										
										
										
											2016-01-19 23:53:28 +01:00
										 |  |  | require "testing_env" | 
					
						
							|  |  |  | require "cmd/info" | 
					
						
							|  |  |  | require "formula" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class InfoCommandTests < Homebrew::TestCase | 
					
						
							|  |  |  |   def test_github_remote_path | 
					
						
							| 
									
										
										
										
											2016-04-03 14:03:33 +01:00
										 |  |  |     remote = "https://github.com/Homebrew/homebrew-core" | 
					
						
							|  |  |  |     assert_equal "https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb", | 
					
						
							| 
									
										
										
										
											2016-01-19 23:53:28 +01:00
										 |  |  |       Homebrew.github_remote_path(remote, "Formula/git.rb") | 
					
						
							| 
									
										
										
										
											2016-04-03 14:03:33 +01:00
										 |  |  |     assert_equal "https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb", | 
					
						
							| 
									
										
										
										
											2016-01-19 23:53:28 +01:00
										 |  |  |       Homebrew.github_remote_path("#{remote}.git", "Formula/git.rb") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     assert_equal "https://github.com/user/repo/blob/master/foo.rb", | 
					
						
							|  |  |  |       Homebrew.github_remote_path("git@github.com:user/repo", "foo.rb") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     assert_equal "https://mywebsite.com/foo/bar.rb", | 
					
						
							|  |  |  |       Homebrew.github_remote_path("https://mywebsite.com", "foo/bar.rb") | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |