tests
authorBlake Mizerany <blakemizerany@blake-mizeranys-computer.local>
Sun, 2 Dec 2007 23:41:58 +0000 (2 15:41 -0800)
committerBlake Mizerany <blakemizerany@blake-mizeranys-computer.local>
Sun, 2 Dec 2007 23:41:58 +0000 (2 15:41 -0800)
test/public/foo.xml [new file with mode: 0644]
test/static_test.rb [new file with mode: 0644]

diff --git a/test/public/foo.xml b/test/public/foo.xml
new file mode 100644 (file)
index 0000000..74d9a6d
--- /dev/null
@@ -0,0 +1 @@
+<foo></foo>
diff --git a/test/static_test.rb b/test/static_test.rb
new file mode 100644 (file)
index 0000000..668b8a6
--- /dev/null
@@ -0,0 +1,13 @@
+require File.dirname(__FILE__) + '/helper'
+
+context "Static files (by default)" do
+
+  specify "are served from root/public" do
+    Sinatra.application.options.public = File.dirname(__FILE__) + '/public'
+    get_it '/foo.xml'
+    should.be.ok
+    body.should.equal "<foo></foo>\n"
+  end
+
+end
+