Skip to content

Instantly share code, notes, and snippets.

@cheezedigital
Created January 12, 2015 20:38
Show Gist options
  • Save cheezedigital/99d29b054db374b05b24 to your computer and use it in GitHub Desktop.
Save cheezedigital/99d29b054db374b05b24 to your computer and use it in GitHub Desktop.
yo yo
this file was taken from a rails application, and what I'm trying to do is test just like below, but in a sinatra application. new to learning how to think, but totally understand what's happening here in the static_pages_controller_test.rb file. is there a particualr gem i can install which will generate the proper files for testing out the sinatra application?
here is the sinatra application: https://github.com/cheezedigital/itempiece6
here is the file from a rails application I'm doing via a tutorial on the webs n shit.
require 'test_helper'
class StaticPagesControllerTest < ActionController::TestCase
test "should get home" do
get :home
assert_response :success
assert_select "title", "Home | this is a mofo app"
end
test "should get help" do
get :help
assert_response :success
assert_select "title", "Help | mofo check dis"
end
test "should get about" do
get :about
assert_response :success
assert_select "title", "About | learnmesomecodes bye felicia"
end
test "should get contact" do
get :contact
assert_response :success
assert_select "title", "Contact | reach out mofo!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment