Permalink
Browse files

add rspec 2

Signed-off-by: David A. Cuadrado <krawek@gmail.com>
  • Loading branch information...
1 parent 349fa0c commit 9d3c9b911404bb053c67ca339a975c82a0d77660 @dcu dcu committed Nov 7, 2010
Showing with 46 additions and 0 deletions.
  1. +1 −0 .rspec
  2. +2 −0 Gemfile
  3. +14 −0 Gemfile.lock
  4. +2 −0 autotest/discover.rb
  5. +27 −0 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
@@ -64,6 +64,8 @@ group :scripts do
end
group :development do
+ gem "rspec", ">= 2.0.1"
+ gem "rspec-rails", ">= 2.0.1"
gem 'hpricot'
gem 'ruby_parser'
gem 'mongrel', '1.2.0.pre2'
View
@@ -68,6 +68,7 @@ GEM
compass (>= 0.8.7)
cronedit (0.3.0)
daemons (1.0.10)
+ diff-lcs (1.1.2)
differ (0.1.1)
dynamic_form (1.1.3)
em-websocket (0.1.4)
@@ -185,6 +186,18 @@ GEM
rdiscount (1.6.5)
rest-client (1.6.1)
mime-types (>= 1.16)
+ rspec (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ rspec-mocks (~> 2.0.1)
+ rspec-core (2.0.1)
+ rspec-expectations (2.0.1)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ rspec-rails (2.0.1)
+ rspec (~> 2.0.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
@@ -239,6 +252,7 @@ DEPENDENCIES
rack-recaptcha (= 0.2.2)
rails (= 3.0.1)
rdiscount (= 1.6.5)
+ rspec-rails (>= 2.0.1)
ruby-stemmer (~> 0.8.2)
ruby_parser
sanitize (= 1.2.1)
View
@@ -0,0 +1,2 @@
+Autotest.add_discovery { "rails" }
+Autotest.add_discovery { "rspec2" }
View
@@ -0,0 +1,27 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path("../../config/environment", __FILE__)
+require 'rspec/rails'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ # == Mock Framework
+ #
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
+ #
+ # config.mock_with :mocha
+ # config.mock_with :flexmock
+ # config.mock_with :rr
+ config.mock_with :rspec
+
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ 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

0 comments on commit 9d3c9b9

Please sign in to comment.