Created
June 1, 2011 21:37
-
-
Save dreamr/1003385 to your computer and use it in GitHub Desktop.
request spec for tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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