Skip to content

Commit

Permalink
Add more specs
Browse files Browse the repository at this point in the history
  • Loading branch information
oleander committed Jan 31, 2012
1 parent e23a6cc commit 9324a64
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions spec/requests/tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,19 @@
2.times { visit root_path }
User.count.should eq(1)
end
end

describe "Project" do
it "should display a new project link" do
visit root_path
page.should have_content("New project")
end

it "should be possible to create a project" do
visit root_path
click_link "New project"
fill_in "Name", with: "My Super Project"
click_button "Create Project"
page.should have_content("My Super Project")
end
end
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
require "capybara/rails"
require "database_cleaner"

ENV["RAILS_ENV"] ||= "test"
abort("RAILS_ENV != test") unless ENV["RAILS_ENV"] == "test"

Spork.prefork do
ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../config/environment", __FILE__)
require "rspec/rails"
require "rspec/autorun"
Expand Down

0 comments on commit 9324a64

Please sign in to comment.