group :development, :test do
gem 'rspec-rails'
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
gem 'launchy'
gem 'database_cleaner'
end
# spec/requests/tasks_spec
describe "Tasks" do
describe "GET /tasks" do
it "displays tasks" do
Task.create!(:name => "paint fence")
visit tasks_path
page.should have_content("paint fence")
end
it "supports js", :js => true do
visit tasks_path
click_link "test js"
page.should have_content("js works")
end
end
describe "POST /tasks" do
it "creates task" do
visit tasks_path
fill_in "New Task", :with => "mow lawn"
click_button "Add"
# save_and_open_page
page.should have_content("Successfully added task.")
page.should have_content("mow lawn")
end
end
end