require File.expand_path('../test_helper', __FILE__)
describe "Blog example" do
before { @app = blog_app }
it "should respond to GET /" do
get('/')
assert_equal 200, response.status
assert_equal "
No posts
", response.body
end
it "should allow a POST to /" do
post('/', :title => 'my title', :contents => 'hey hey hey')
assert_equal 302, response.status
assert_equal '/1', response.headers['Location']
get('/')
assert_equal 200, response.status
assert_equal "