Permalink
Browse files

Added RSpec.

  • Loading branch information...
1 parent cbe93d6 commit 4f3e2f8eb32d9ddb757676d8fb377f20c546dba0 @OakRaven committed Nov 30, 2011
Showing with 61 additions and 0 deletions.
  1. +1 −0 .rspec
  2. +8 −0 Gemfile
  3. +23 −0 Gemfile.lock
  4. +2 −0 autotest/discover.rb
  5. +27 −0 spec/spec_helper.rb
View
@@ -0,0 +1 @@
+--colour
View
@@ -13,6 +13,14 @@ gem 'rails', '3.1.3'
gem 'sqlite3'
gem 'pg'
+group :development do
+ gem 'rspec-rails', '2.0.1'
+end
+
+group :test do
+ gem 'rspec', '2.0.1'
+ gem 'webrat', '0.7.1'
+end
# Gems used only for assets and not required
# in production environments by default.
View
@@ -38,6 +38,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.3)
+ diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
multi_json (~> 1.0)
@@ -53,6 +54,8 @@ GEM
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
+ nokogiri (1.5.0)
+ pg (0.11.0)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
@@ -81,6 +84,18 @@ GEM
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
+ 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)
sass (3.1.11)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
@@ -101,14 +116,22 @@ GEM
uglifier (1.1.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
+ webrat (0.7.1)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.1.1)
jquery-rails
+ pg
rails (= 3.1.3)
+ rspec (= 2.0.1)
+ rspec-rails (= 2.0.1)
sass-rails (~> 3.1.5)
sqlite3
uglifier (>= 1.0.3)
+ webrat (= 0.7.1)
@@ -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 4f3e2f8

Please sign in to comment.