Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
toolmantim committed Jul 6, 2009
0 parents commit e986b6b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app.rb
@@ -0,0 +1,8 @@
require 'sinatra'
require 'haml'

set :app_file, __FILE__

get '/' do
haml :home
end
4 changes: 4 additions & 0 deletions features/home.feature
@@ -0,0 +1,4 @@
Feature:
Scenario: / returns the sinatra environment
When GET on /
Then body is "test!"
7 changes: 7 additions & 0 deletions features/steps/generic.rb
@@ -0,0 +1,7 @@
When /GET on (.*)/ do |path|
get path
end

Then /body is "(.*)"/ do |text|
last_response.body.strip.should == text
end
17 changes: 17 additions & 0 deletions features/support/env.rb
@@ -0,0 +1,17 @@
require 'sinatra'

set :app_file, File.dirname(__FILE__) + "/../../app"
set :environment, :test

require Sinatra::Application.app_file

require 'spec'
require 'spec/expectations'
require 'rack/test'

World do
def app
Sinatra::Application
end
include Rack::Test::Methods
end
1 change: 1 addition & 0 deletions views/home.haml
@@ -0,0 +1 @@
== #{Sinatra::Application.environment}!

0 comments on commit e986b6b

Please sign in to comment.