blob: b7259078ffadf3f86be72f316ad01e6b8243dc38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "theme_url_to_theme_name" do
it "should deal with a typical bare repo URL" do
url = 'git://wherever/blah-theme.git'
theme_url_to_theme_name(url).should == 'blah-theme'
end
it "should deal with a typical bare repo URL with trailing slashes" do
url = 'ssh://wherever/blah-theme.git//'
theme_url_to_theme_name(url).should == 'blah-theme'
end
it "should deal with a typical non-bare repo URL" do
url = '/home/whoever/themes/blah-theme'
theme_url_to_theme_name(url).should == 'blah-theme'
end
it "should deal with a typical non-bare repo URL with a trailing slash" do
url = '/home/whoever/themes/blah-theme/'
theme_url_to_theme_name(url).should == 'blah-theme'
end
end
|