Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add rspec rails.

  • Loading branch information...
commit d51e060308f0c6debd31657e92acac505c1cf8d4 1 parent d87dda6
Sebastian Korfmann authored
1  .rspec
... ...
@@ -0,0 +1 @@
  1
+--color
4  Gemfile
@@ -20,6 +20,10 @@ group :assets do
20 20
   gem 'uglifier', '>= 1.0.3'
21 21
 end
22 22
 
  23
+group :test, :development do
  24
+  gem 'rspec-rails'
  25
+end
  26
+
23 27
 gem 'jquery-rails'
24 28
 
25 29
 # To use ActiveModel has_secure_password
15  Gemfile.lock
@@ -37,6 +37,7 @@ GEM
37 37
       coffee-script-source
38 38
       execjs
39 39
     coffee-script-source (1.3.3)
  40
+    diff-lcs (1.1.3)
40 41
     erubis (2.7.0)
41 42
     execjs (1.4.0)
42 43
       multi_json (~> 1.0)
@@ -79,6 +80,19 @@ GEM
79 80
     rake (0.9.2.2)
80 81
     rdoc (3.12)
81 82
       json (~> 1.4)
  83
+    rspec (2.11.0)
  84
+      rspec-core (~> 2.11.0)
  85
+      rspec-expectations (~> 2.11.0)
  86
+      rspec-mocks (~> 2.11.0)
  87
+    rspec-core (2.11.1)
  88
+    rspec-expectations (2.11.3)
  89
+      diff-lcs (~> 1.1.3)
  90
+    rspec-mocks (2.11.3)
  91
+    rspec-rails (2.11.0)
  92
+      actionpack (>= 3.0)
  93
+      activesupport (>= 3.0)
  94
+      railties (>= 3.0)
  95
+      rspec (~> 2.11.0)
82 96
     sass (3.2.1)
83 97
     sass-rails (3.2.5)
84 98
       railties (~> 3.2.0)
@@ -106,6 +120,7 @@ DEPENDENCIES
106 120
   coffee-rails (~> 3.2.1)
107 121
   jquery-rails
108 122
   rails (= 3.2.8)
  123
+  rspec-rails
109 124
   sass-rails (~> 3.2.3)
110 125
   sqlite3
111 126
   uglifier (>= 1.0.3)
38  spec/spec_helper.rb
... ...
@@ -0,0 +1,38 @@
  1
+# This file is copied to spec/ when you run 'rails generate rspec:install'
  2
+ENV["RAILS_ENV"] ||= 'test'
  3
+require File.expand_path("../../config/environment", __FILE__)
  4
+require 'rspec/rails'
  5
+require 'rspec/autorun'
  6
+
  7
+# Requires supporting ruby files with custom matchers and macros, etc,
  8
+# in spec/support/ and its subdirectories.
  9
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
  10
+
  11
+RSpec.configure do |config|
  12
+  # ## Mock Framework
  13
+  #
  14
+  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
  15
+  #
  16
+  # config.mock_with :mocha
  17
+  # config.mock_with :flexmock
  18
+  # config.mock_with :rr
  19
+
  20
+  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
  21
+  config.fixture_path = "#{::Rails.root}/spec/fixtures"
  22
+
  23
+  # If you're not using ActiveRecord, or you'd prefer not to run each of your
  24
+  # examples within a transaction, remove the following line or assign false
  25
+  # instead of true.
  26
+  config.use_transactional_fixtures = true
  27
+
  28
+  # If true, the base class of anonymous controllers will be inferred
  29
+  # automatically. This will be the default behavior in future versions of
  30
+  # rspec-rails.
  31
+  config.infer_base_class_for_anonymous_controllers = false
  32
+
  33
+  # Run specs in random order to surface order dependencies. If you find an
  34
+  # order dependency and want to debug it, you can fix the order by providing
  35
+  # the seed, which is printed after each run.
  36
+  #     --seed 1234
  37
+  config.order = "random"
  38
+end

0 notes on commit d51e060

Please sign in to comment.
Something went wrong with that request. Please try again.