Make the Sinatra app directory aware.

This commit is contained in:
Darren Oakley
2012-06-18 16:00:14 +01:00
parent b53c961db2
commit 971cbb94f6
25 changed files with 468 additions and 127 deletions
+13
View File
@@ -0,0 +1,13 @@
# ~*~ encoding: utf-8 ~*~
require File.expand_path(File.join(File.dirname(__FILE__), "helper"))
context "Precious::Helpers" do
include Precious::Helpers
test "extracting paths from URLs" do
assert_nil extract_path('Eye-Of-Sauron')
assert_equal 'Mordor', extract_path('Mordor/Sauron')
assert_equal 'Mordor/Sauron', extract_path('Mordor/Sauron/Evil')
end
end