Skip to content

Instantly share code, notes, and snippets.

@dcrec1
Created June 2, 2010 00:45
Show Gist options
  • Save dcrec1/421757 to your computer and use it in GitHub Desktop.
Save dcrec1/421757 to your computer and use it in GitHub Desktop.
Sinatra + RSpec
require 'spec_helper'
describe Sinatra::Application do
context "responding to GET /" do
it "should return status code 200"
get '/'
last_response.code.should == 200
end
end
end
require 'spec/rake/spectask'
desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --color)
end
require File.join(File.dirname(__FILE__), '..', 'main.rb')
require 'spec'
require 'rack/test'
Spec::Runner.configure do |conf|
conf.include Rack::Test::Methods
end
def app
Sinatra::Application
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment