From a203474d47370b4c8ed5f81637f41f7af060122d Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Sun, 2 Dec 2007 15:41:58 -0800 Subject: [PATCH] tests --- test/public/foo.xml | 1 + test/static_test.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/public/foo.xml create mode 100644 test/static_test.rb diff --git a/test/public/foo.xml b/test/public/foo.xml new file mode 100644 index 0000000..74d9a6d --- /dev/null +++ b/test/public/foo.xml @@ -0,0 +1 @@ + diff --git a/test/static_test.rb b/test/static_test.rb new file mode 100644 index 0000000..668b8a6 --- /dev/null +++ b/test/static_test.rb @@ -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 "\n" + end + +end + -- 2.11.4.GIT