Skip to content

Instantly share code, notes, and snippets.

@dreamr
Created June 1, 2011 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreamr/1003385 to your computer and use it in GitHub Desktop.
Save dreamr/1003385 to your computer and use it in GitHub Desktop.
request spec for tasks
require 'spec_helper'
describe "Tasks" do
before(:each) do
login_as(:developer)
end
describe "GET /tasks" do
it "renders" do
visit tasks_path
page.driver.status_code.should be(200)
end
end
describe "GET /tasks/new" do
it "renders" do
visit new_task_path
page.driver.status_code.should be(200)
save_and_open_page
page.should have_xpath("//h1", :text => "New task")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment