Skip to content

Instantly share code, notes, and snippets.

@fivetwentysix
Created December 2, 2011 10:12
Show Gist options
  • Save fivetwentysix/1422677 to your computer and use it in GitHub Desktop.
Save fivetwentysix/1422677 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "layouts/application.html.haml" do
it "should not render the current user" do
render
rendered.should_not have_selector("#current_user")
end
it "should render the current user when signed in" do
login_user(Factory(:user))
render
rendered.should have_selector("#current_user")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment