Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Install RSpec (because TATFT is what I do)

  • Loading branch information...
commit 186403b7b7865000f41cfaf86e505b94b76572d8 1 parent 82e23a5
Matt Van Horn authored
Showing with 52 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  Gemfile
  3. +15 −0 Gemfile.lock
  4. +33 −0 spec/spec_helper.rb
View
1  .gitignore
@@ -6,3 +6,4 @@ tmp/
config/database.yml
.DS_Store
+.rspec
View
3  Gemfile
@@ -30,3 +30,6 @@ gem 'thin'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
+group :development, :test do
+ gem "rspec-rails"
+end
View
15 Gemfile.lock
@@ -39,6 +39,7 @@ GEM
execjs
coffee-script-source (1.2.0)
daemons (1.1.5)
+ diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.13)
@@ -84,6 +85,19 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ rspec-rails (2.7.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.7.0)
sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
@@ -116,6 +130,7 @@ DEPENDENCIES
jquery-rails
pg
rails (= 3.1.1)
+ rspec-rails
sass-rails (~> 3.1.4)
thin
uglifier (>= 1.0.3)
View
33 spec/spec_helper.rb
@@ -0,0 +1,33 @@
+# 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'
+require 'rspec/autorun'
+
+# 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
+
+ # If true, the base class of anonymous controllers will be inferred
+ # automatically. This will be the default behavior in future versions of
+ # rspec-rails.
+ config.infer_base_class_for_anonymous_controllers = false
+end
Please sign in to comment.
Something went wrong with that request. Please try again.