Skip to content

Instantly share code, notes, and snippets.

@alexch
Created May 10, 2012 21:23
Show Gist options
  • Save alexch/2655994 to your computer and use it in GitHub Desktop.
Save alexch/2655994 to your computer and use it in GitHub Desktop.
New test for chapter 5 of RailsTutorial
describe ApplicationHelper do
describe "full_title" do
it "includes the page name" do
full_title("foo").should include("foo")
end
it "includes the base name" do
full_title("foo").should include("Ruby on Rails Tutorial Sample App")
end
it "doesn't include a bar for the home page" do
full_title("").should_not include('|')
end
end
end
# Now inside the StaticPages spec we can do
#
# describe "Static pages" do
# include ApplicationHelper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment