Update gems and install rspec

This commit is contained in:
ihower 2011-04-13 19:02:18 +08:00
parent 8a4cffae8f
commit 99d83279f5
10 changed files with 98 additions and 144 deletions

1
.rspec Normal file
View File

@ -0,0 +1 @@
--colour

38
Gemfile
View File

@ -1,6 +1,8 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'rails', '3.0.3' gem 'rails', '3.0.6'
gem 'yajl-ruby', :require => 'yajl'
gem 'nokogiri'
gem 'bson_ext', '1.2.4' gem 'bson_ext', '1.2.4'
gem 'carrierwave' gem 'carrierwave'
@ -10,29 +12,19 @@ gem 'mini_magick'
# gem 'rblog', :path => 'lib/rblog' # gem 'rblog', :path => 'lib/rblog'
gem 'mongoid', '2.0.0' gem 'mongoid', '2.0.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug' # gem 'ruby-debug'
# gem 'ruby-debug19' # gem 'ruby-debug19'
# Bundle the extra gems: group :test, :development do
# gem 'bj' gem "rspec", "~> 2.0"
# gem 'nokogiri' gem "rspec-rails", "~> 2.0"
# gem 'sqlite3-ruby', :require => 'sqlite3' gem "factory_girl_rails"
# gem 'aws-s3', :require => 'aws/s3' gem "shoulda-matchers"
gem "rcov"
# Bundle gems for the local environment. Make sure to gem "delorean"
# put test-only gems in this group so their generators gem "watchr"
# and rake tasks are available in development mode: # gem "capybara"
# group :development, :test do # gem 'yard'
# gem 'webrat' # gem "bluecloth"
# end end

View File

@ -2,32 +2,32 @@ GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
abstract (1.0.0) abstract (1.0.0)
actionmailer (3.0.3) actionmailer (3.0.6)
actionpack (= 3.0.3) actionpack (= 3.0.6)
mail (~> 2.2.9) mail (~> 2.2.15)
actionpack (3.0.3) actionpack (3.0.6)
activemodel (= 3.0.3) activemodel (= 3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
builder (~> 2.1.2) builder (~> 2.1.2)
erubis (~> 2.6.6) erubis (~> 2.6.6)
i18n (~> 0.4) i18n (~> 0.5.0)
rack (~> 1.2.1) rack (~> 1.2.1)
rack-mount (~> 0.6.13) rack-mount (~> 0.6.14)
rack-test (~> 0.5.6) rack-test (~> 0.5.7)
tzinfo (~> 0.3.23) tzinfo (~> 0.3.23)
activemodel (3.0.3) activemodel (3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
builder (~> 2.1.2) builder (~> 2.1.2)
i18n (~> 0.4) i18n (~> 0.5.0)
activerecord (3.0.3) activerecord (3.0.6)
activemodel (= 3.0.3) activemodel (= 3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
arel (~> 2.0.2) arel (~> 2.0.2)
tzinfo (~> 0.3.23) tzinfo (~> 0.3.23)
activeresource (3.0.3) activeresource (3.0.6)
activemodel (= 3.0.3) activemodel (= 3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
activesupport (3.0.3) activesupport (3.0.6)
arel (2.0.9) arel (2.0.9)
bcrypt-ruby (2.1.4) bcrypt-ruby (2.1.4)
bson (1.3.0) bson (1.3.0)
@ -35,12 +35,20 @@ GEM
builder (2.1.2) builder (2.1.2)
carrierwave (0.5.3) carrierwave (0.5.3)
activesupport (~> 3.0) activesupport (~> 3.0)
chronic (0.3.0)
delorean (1.0.0)
chronic
devise (1.2.1) devise (1.2.1)
bcrypt-ruby (~> 2.1.2) bcrypt-ruby (~> 2.1.2)
orm_adapter (~> 0.0.3) orm_adapter (~> 0.0.3)
warden (~> 1.0.3) warden (~> 1.0.3)
diff-lcs (1.1.2)
erubis (2.6.6) erubis (2.6.6)
abstract (>= 1.0.0) abstract (>= 1.0.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
railties (>= 3.0.0)
i18n (0.5.0) i18n (0.5.0)
mail (2.2.15) mail (2.2.15)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
@ -57,6 +65,7 @@ GEM
mongo (~> 1.2) mongo (~> 1.2)
tzinfo (~> 0.3.22) tzinfo (~> 0.3.22)
will_paginate (~> 3.0.pre) will_paginate (~> 3.0.pre)
nokogiri (1.4.4)
orm_adapter (0.0.4) orm_adapter (0.0.4)
polyglot (0.3.1) polyglot (0.3.1)
rack (1.2.2) rack (1.2.2)
@ -64,20 +73,35 @@ GEM
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (0.5.7) rack-test (0.5.7)
rack (>= 1.0) rack (>= 1.0)
rails (3.0.3) rails (3.0.6)
actionmailer (= 3.0.3) actionmailer (= 3.0.6)
actionpack (= 3.0.3) actionpack (= 3.0.6)
activerecord (= 3.0.3) activerecord (= 3.0.6)
activeresource (= 3.0.3) activeresource (= 3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.0.3) railties (= 3.0.6)
railties (3.0.3) railties (3.0.6)
actionpack (= 3.0.3) actionpack (= 3.0.6)
activesupport (= 3.0.3) activesupport (= 3.0.6)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (~> 0.14.4) thor (~> 0.14.4)
rake (0.8.7) rake (0.8.7)
rcov (0.9.9)
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)
shoulda-matchers (1.0.0.beta2)
subexec (0.0.4) subexec (0.0.4)
thor (0.14.6) thor (0.14.6)
treetop (1.4.9) treetop (1.4.9)
@ -85,7 +109,9 @@ GEM
tzinfo (0.3.26) tzinfo (0.3.26)
warden (1.0.3) warden (1.0.3)
rack (>= 1.0.0) rack (>= 1.0.0)
watchr (0.7)
will_paginate (3.0.pre2) will_paginate (3.0.pre2)
yajl-ruby (0.8.2)
PLATFORMS PLATFORMS
ruby ruby
@ -93,7 +119,16 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bson_ext (= 1.2.4) bson_ext (= 1.2.4)
carrierwave carrierwave
delorean
devise devise
factory_girl_rails
mini_magick mini_magick
mongoid (= 2.0.0) mongoid (= 2.0.0)
rails (= 3.0.3) nokogiri
rails (= 3.0.6)
rcov
rspec (~> 2.0)
rspec-rails (~> 2.0)
shoulda-matchers
watchr
yajl-ruby

View File

@ -1,54 +1,27 @@
# This file is copied to ~/spec when you run 'ruby script/generate rspec' # This file is copied to spec/ when you run 'rails generate rspec:install'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test' ENV["RAILS_ENV"] ||= 'test'
require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment')) require File.expand_path("../../config/environment", __FILE__)
require 'spec/autorun' require 'rspec/rails'
require 'spec/rails'
# Uncomment the next line to use webrat's matchers # Requires supporting ruby files with custom matchers and macros, etc,
#require 'webrat/integrations/rspec-rails' # in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
# Requires supporting files with custom matchers and macros, etc, RSpec.configure do |config|
# in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
Spec::Runner.configure do |config|
# If you're not using ActiveRecord you should remove these
# lines, delete config/database.yml and disable :active_record
# in your config/boot.rb
config.use_transactional_fixtures = true
config.use_instantiated_fixtures = false
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
# == Fixtures
#
# You can declare fixtures for each example_group like this:
# describe "...." do
# fixtures :table_a, :table_b
#
# Alternatively, if you prefer to declare them only once, you can
# do so right here. Just uncomment the next line and replace the fixture
# names with your fixtures.
#
# config.global_fixtures = :table_a, :table_b
#
# If you declare global fixtures, be aware that they will be declared
# for all of your examples, even those that don't use them.
#
# You can also declare which fixtures to use (for example fixtures for test/fixtures):
#
# config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
#
# == Mock Framework # == Mock Framework
# #
# RSpec uses it's own mocking framework by default. If you prefer to # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
# use mocha, flexmock or RR, uncomment the appropriate line:
# #
# config.mock_with :mocha # config.mock_with :mocha
# config.mock_with :flexmock # config.mock_with :flexmock
# config.mock_with :rr # config.mock_with :rr
# config.mock_with :rspec
# == Notes
# # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
# For more information take a look at Spec::Runner::Configuration and Spec::Runner config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
end end

View File

@ -1,11 +0,0 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

View File

@ -1,8 +0,0 @@
require 'test_helper'
class SitesControllerTest < ActionController::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end

View File

@ -1,9 +0,0 @@
require 'test_helper'
require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionDispatch::PerformanceTest
def test_homepage
get '/'
end
end

View File

@ -1,7 +0,0 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Add more helper methods to be used by all tests here...
end

View File

@ -1,4 +0,0 @@
require 'test_helper'
class SitesHelperTest < ActionView::TestCase
end

View File

@ -1,8 +0,0 @@
require 'test_helper'
class SiteTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end