aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-11-15 11:39:12 +0000
committerMark Longair <mhl@pobox.com>2013-11-15 11:39:12 +0000
commit64618741c17760fcb59647d74d1ccaff56160b15 (patch)
treed84f1f035b136180f0bdacb22895fbb0f1abf2c1 /spec/lib
parent96b3b5adbdafb25e5ab6ca94b89d6682a2e8f0e4 (diff)
parentcda26c36f309cdd8e8bbab9186f6cc0d4876e6c9 (diff)
Merge branch 'release/0.15' into wdtk
Conflicts: lib/tasks/stats.rake
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/theme_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/lib/theme_spec.rb b/spec/lib/theme_spec.rb
new file mode 100644
index 000000000..829c1a269
--- /dev/null
+++ b/spec/lib/theme_spec.rb
@@ -0,0 +1,25 @@
+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