Permalink
Browse files

adding rspec-rails and a sample spec

  • Loading branch information...
1 parent dbab5c9 commit ccd6d09f9ec9175503d64cc17f99404c147602e8 @dougalcorn dougalcorn committed Oct 30, 2011
Showing with 57 additions and 0 deletions.
  1. +1 −0 .rspec
  2. +1 −0 Gemfile
  3. +15 −0 Gemfile.lock
  4. +33 −0 spec/spec_helper.rb
  5. +7 −0 spec/test_spec.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
@@ -33,4 +33,5 @@ gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', :require => false
+ gem "rspec-rails"
end
View
@@ -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.2)
rdoc (3.11)
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.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
sass-rails (~> 3.1.4)
sqlite3
turn
View
@@ -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
View
@@ -0,0 +1,7 @@
+require 'spec_helper'
+
+describe "Testing" do
+ it "involves specs" do
+ true.should be_true
+ end
+end

0 comments on commit ccd6d09

Please sign in to comment.