Commit 0db5f2e6
Changed files (5)
spec/requests/logins_spec.rb
@@ -0,0 +1,30 @@
+require 'spec_helper'
+
+describe "Logins" do
+ describe "GET /logins" do
+ it "works! (now write some real specs)" do
+ get "/login"
+ response.body.should include("Got an account? Login!")
+ end
+ end
+
+ describe "Signup for a new user account" do
+ it "should make a new user present a confirmation" do
+ visit "/login"
+
+ within(".form-horizontal") do
+ fill_in('user_name', :with => 'John Smith')
+ fill_in('user_city', :with => 'Calgary, Alberta, Canada')
+ fill_in('user_email',:with => 'test@example.com')
+ fill_in('user_password', :with => 'password')
+ fill_in('user_password_confirmation', :with => 'password')
+ click_button "submit-registration"
+ end
+
+ page.should have_content "You have signed up successfully"
+ end
+
+ end
+
+
+end
spec/requests/profiles_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Profiles" do
+ describe "GET /profiles" do
+ it "works! (now write some real specs)" do
+ get profiles_path
+ response.status.should be(200)
+ end
+ end
+
+end
spec/spec_helper.rb
@@ -4,10 +4,13 @@ SimpleCov.start 'rails'
require 'rubygems'
require 'spork'
+
+
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
+ require 'capybara/rails'
require 'capybara/rspec'
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Gemfile
@@ -22,7 +22,7 @@ gem 'simplecov', :require => false, :group => :test
group :development, :test do
gem 'pg'
- gem 'webrat'
+ #gem 'webrat'
gem 'rspec-rails'
gem 'jasmine'
gem 'sqlite3'
Gemfile.lock
@@ -278,10 +278,6 @@ GEM
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1)
rack (>= 1.0)
- webrat (0.7.3)
- nokogiri (>= 1.2.0)
- rack (>= 1.0)
- rack-test (>= 0.5.3)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -326,4 +322,3 @@ DEPENDENCIES
spork
sqlite3
uglifier
- webrat