Commit 0845a4443ba9c5240e704187c6e283e133d4e3f4
1 parent
a06272c0
Exists in
colab
and in
4 other branches
Installed RSpec gem for general tests
Showing
4 changed files
with
56 additions
and
0 deletions
Show diff stats
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +--color |
Gemfile
@@ -22,6 +22,10 @@ end | @@ -22,6 +22,10 @@ end | ||
22 | 22 | ||
23 | gem 'jquery-rails' | 23 | gem 'jquery-rails' |
24 | 24 | ||
25 | +group :development, :test do | ||
26 | + gem 'rspec-rails' | ||
27 | +end | ||
28 | + | ||
25 | # To use ActiveModel has_secure_password | 29 | # To use ActiveModel has_secure_password |
26 | # gem 'bcrypt-ruby', '~> 3.0.0' | 30 | # gem 'bcrypt-ruby', '~> 3.0.0' |
27 | 31 |
Gemfile.lock
@@ -37,6 +37,7 @@ GEM | @@ -37,6 +37,7 @@ GEM | ||
37 | coffee-script-source | 37 | coffee-script-source |
38 | execjs | 38 | execjs |
39 | coffee-script-source (1.6.2) | 39 | coffee-script-source (1.6.2) |
40 | + diff-lcs (1.2.4) | ||
40 | erubis (2.7.0) | 41 | erubis (2.7.0) |
41 | execjs (1.4.0) | 42 | execjs (1.4.0) |
42 | multi_json (~> 1.0) | 43 | multi_json (~> 1.0) |
@@ -81,6 +82,17 @@ GEM | @@ -81,6 +82,17 @@ GEM | ||
81 | rdoc (3.12.2) | 82 | rdoc (3.12.2) |
82 | json (~> 1.4) | 83 | json (~> 1.4) |
83 | ref (1.0.4) | 84 | ref (1.0.4) |
85 | + rspec-core (2.13.1) | ||
86 | + rspec-expectations (2.13.0) | ||
87 | + diff-lcs (>= 1.1.3, < 2.0) | ||
88 | + rspec-mocks (2.13.1) | ||
89 | + rspec-rails (2.13.1) | ||
90 | + actionpack (>= 3.0) | ||
91 | + activesupport (>= 3.0) | ||
92 | + railties (>= 3.0) | ||
93 | + rspec-core (~> 2.13.0) | ||
94 | + rspec-expectations (~> 2.13.0) | ||
95 | + rspec-mocks (~> 2.13.0) | ||
84 | sass (3.2.8) | 96 | sass (3.2.8) |
85 | sass-rails (3.2.6) | 97 | sass-rails (3.2.6) |
86 | railties (~> 3.2.0) | 98 | railties (~> 3.2.0) |
@@ -112,6 +124,7 @@ DEPENDENCIES | @@ -112,6 +124,7 @@ DEPENDENCIES | ||
112 | coffee-rails (~> 3.2.1) | 124 | coffee-rails (~> 3.2.1) |
113 | jquery-rails | 125 | jquery-rails |
114 | rails (= 3.2.13) | 126 | rails (= 3.2.13) |
127 | + rspec-rails | ||
115 | sass-rails (~> 3.2.3) | 128 | sass-rails (~> 3.2.3) |
116 | sqlite3 | 129 | sqlite3 |
117 | therubyracer | 130 | therubyracer |
@@ -0,0 +1,38 @@ | @@ -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 |