spec/server_spec.rb in awestruct-0.5.0.cr vs spec/server_spec.rb in awestruct-0.5.0

- old
+ new

@@ -13,9 +13,18 @@ get('/index.html') last_response.headers['Content-Type'].should == 'text/html' end end + describe "Directory redirect" do + it "should redirect to /" do + get('/subdir') + last_response.headers['location'].should == '/subdir/' + last_response.instance_variable_get('@body').should == ['Redirecting to: /subdir'] + last_response.body.should == 'Redirecting to: /subdir' + end + end + describe "CSS media type" do it "should return text/css" do get('/stylesheets/screen.css') last_response.headers['Content-Type'].should == 'text/css' end