Permalink
Browse files

updated to ruby 1.9, added rspec (and a few spec) and remove the test…

…:unit unit tests
  • Loading branch information...
1 parent f6b749e commit b0d622bfe1360c9682864bea7ed6d82755bf5ee0 @cheezy committed May 1, 2011
View
1 .rspec
@@ -0,0 +1 @@
+--color --format doc --profile
View
2 .rvmrc
@@ -1 +1 @@
-rvm use 1.8.7
+rvm 1.9.2
View
41 Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.6'
+gem 'rails', '3.0.7'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -9,25 +9,20 @@ gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'will_paginate', '>=3.0pre2'
gem 'jquery-rails'
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
-
-# To use debugger
-# gem 'ruby-debug'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
-
-
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+group :test do
+ gem 'rspec'
+ gem 'jasmine'
+ gem 'factory_girl_rails'
+
+ group :cucumber do
+ gem 'watir-webdriver'
+ gem 'capybara'
+ gem 'database_cleaner'
+ gem 'cucumber'
+ gem 'cucumber-rails'
+ end
+end
+
+group :development, :test do
+ gem 'rspec-rails'
+end
View
@@ -2,78 +2,154 @@ GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
- actionmailer (3.0.6)
- actionpack (= 3.0.6)
+ actionmailer (3.0.7)
+ actionpack (= 3.0.7)
mail (~> 2.2.15)
- actionpack (3.0.6)
- activemodel (= 3.0.6)
- activesupport (= 3.0.6)
+ actionpack (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
- activemodel (3.0.6)
- activesupport (= 3.0.6)
+ activemodel (3.0.7)
+ activesupport (= 3.0.7)
builder (~> 2.1.2)
i18n (~> 0.5.0)
- activerecord (3.0.6)
- activemodel (= 3.0.6)
- activesupport (= 3.0.6)
+ activerecord (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
- activeresource (3.0.6)
- activemodel (= 3.0.6)
- activesupport (= 3.0.6)
- activesupport (3.0.6)
+ activeresource (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
+ activesupport (3.0.7)
arel (2.0.9)
builder (2.1.2)
+ capybara (0.4.1.2)
+ celerity (>= 0.7.9)
+ culerity (>= 0.2.4)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (>= 0.0.27)
+ xpath (~> 0.1.3)
+ celerity (0.8.9)
+ childprocess (0.1.8)
+ ffi (~> 1.0.6)
+ cucumber (0.10.2)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (>= 2.3.5)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.5)
+ cucumber-rails (0.4.1)
+ cucumber (>= 0.10.1)
+ nokogiri (>= 1.4.4)
+ rack-test (>= 0.5.7)
+ culerity (0.2.15)
+ database_cleaner (0.6.7)
+ diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
+ factory_girl (1.3.3)
+ factory_girl_rails (1.0.1)
+ factory_girl (~> 1.3)
+ railties (>= 3.0.0)
+ ffi (1.0.7)
+ rake (>= 0.8.7)
+ gherkin (2.3.6)
+ json (>= 1.4.6)
i18n (0.5.0)
+ jasmine (1.0.2.0)
+ json_pure (>= 1.4.3)
+ rack (>= 1.1)
+ rspec (>= 1.3.1)
+ selenium-webdriver (>= 0.1.3)
jquery-rails (0.2.7)
rails (~> 3.0)
thor (~> 0.14.4)
- mail (2.2.15)
+ json (1.5.1)
+ json_pure (1.5.1)
+ mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
+ nokogiri (1.4.4)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
- rails (3.0.6)
- actionmailer (= 3.0.6)
- actionpack (= 3.0.6)
- activerecord (= 3.0.6)
- activeresource (= 3.0.6)
- activesupport (= 3.0.6)
+ rails (3.0.7)
+ actionmailer (= 3.0.7)
+ actionpack (= 3.0.7)
+ activerecord (= 3.0.7)
+ activeresource (= 3.0.7)
+ activesupport (= 3.0.7)
bundler (~> 1.0)
- railties (= 3.0.6)
- railties (3.0.6)
- actionpack (= 3.0.6)
- activesupport (= 3.0.6)
+ railties (= 3.0.7)
+ railties (3.0.7)
+ actionpack (= 3.0.7)
+ activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
- sqlite3-ruby (1.3.1)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.1)
+ rspec-expectations (2.5.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.5.0)
+ rspec-rails (2.5.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.5.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.2.0)
+ childprocess (>= 0.1.7)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ sqlite3 (1.3.3)
+ sqlite3-ruby (1.3.3)
+ sqlite3 (>= 1.3.3)
+ term-ansicolor (1.0.5)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
- tzinfo (0.3.26)
+ tzinfo (0.3.27)
+ watir-webdriver (0.2.3)
+ selenium-webdriver (>= 0.2.0)
will_paginate (3.0.pre2)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
+ capybara
+ cucumber
+ cucumber-rails
+ database_cleaner
+ factory_girl_rails
+ jasmine
jquery-rails
- rails (= 3.0.6)
+ rails (= 3.0.7)
+ rspec
+ rspec-rails
sqlite3-ruby
+ watir-webdriver
will_paginate (>= 3.0pre2)
@@ -2,35 +2,29 @@ class AdoptionsController < ApplicationController
skip_before_filter :authorize
# GET /adoptions
- # GET /adoptions.xml
def index
@adoptions = Adoption.all
respond_to do |format|
format.html # index.html.erb
- format.xml { render :xml => @adoptions }
end
end
# GET /adoptions/1
- # GET /adoptions/1.xml
def show
@adoption = Adoption.find(params[:id])
respond_to do |format|
format.html # show.html.erb
- format.xml { render :xml => @adoption }
end
end
# GET /adoptions/new
- # GET /adoptions/new.xml
def new
@adoption = Adoption.new
respond_to do |format|
format.html # new.html.erb
- format.xml { render :xml => @adoption }
end
end
@@ -40,7 +34,6 @@ def edit
end
# POST /adoptions
- # POST /adoptions.xml
def create
@cart = current_cart
puppy = Puppy.find(params[:puppy_id])
@@ -49,39 +42,32 @@ def create
respond_to do |format|
if @adoption.save
format.html { redirect_to(@adoption.cart) }
- format.xml { render :xml => @adoption, :status => :created, :location => @adoption }
else
format.html { render :action => "new" }
- format.xml { render :xml => @adoption.errors, :status => :unprocessable_entity }
end
end
end
# PUT /adoptions/1
- # PUT /adoptions/1.xml
def update
@adoption = Adoption.find(params[:id])
respond_to do |format|
if @adoption.update_attributes(params[:adoption])
format.html { redirect_to(@adoption, :notice => 'Adoption was successfully updated.') }
- format.xml { head :ok }
else
format.html { render :action => "edit" }
- format.xml { render :xml => @adoption.errors, :status => :unprocessable_entity }
end
end
end
# DELETE /adoptions/1
- # DELETE /adoptions/1.xml
def destroy
@adoption = Adoption.find(params[:id])
@adoption.destroy
respond_to do |format|
format.html { redirect_to(adoptions_url) }
- format.xml { head :ok }
end
end
end
Oops, something went wrong.

0 comments on commit b0d622b

Please sign in to comment.