Permalink
Browse files

add rspec

  • Loading branch information...
1 parent 96f7a85 commit d77600d32bfc70bf2f90f4784c34e89c0b54bdc7 @haru01 committed Oct 13, 2011
Showing with 44 additions and 0 deletions.
  1. +1 −0 .rspec
  2. +1 −0 Gemfile
  3. +15 −0 Gemfile.lock
  4. +27 −0 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
1 Gemfile
@@ -33,4 +33,5 @@ gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', :require => false
+ gem "rspec-rails", "~> 2.6"
end
View
15 Gemfile.lock
@@ -39,6 +39,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.2)
+ diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
multi_json (~> 1.0)
@@ -82,6 +83,19 @@ GEM
rake (0.9.2)
rdoc (3.10)
json (~> 1.4)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
@@ -113,6 +127,7 @@ DEPENDENCIES
coffee-rails (~> 3.1.1)
jquery-rails
rails (= 3.1.1)
+ rspec-rails (~> 2.6)
sass-rails (~> 3.1.4)
sqlite3
turn
View
27 spec/spec_helper.rb
@@ -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 d77600d

Please sign in to comment.