Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created October 3, 2011 22:30
Show Gist options
  • Save daveworth/1260437 to your computer and use it in GitHub Desktop.
Save daveworth/1260437 to your computer and use it in GitHub Desktop.
describe "Setup link visibility" do
["basic", "advanced"].each do |role|
it "should not be visible to #{role}s", :driver => :rack_test do
login_as(role.to_sym) do
visit root_path
page.should_not have_content("MailChimp Setup")
end
end
end
["owner", "admin"].each do |role|
it "should be visible to #{role}s", :driver => :rack_test do
login_as(role.to_sym) do
visit root_path
page.should have_content("MailChimp Setup")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment