Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add testing and CI dependencies and a fake passing spec t:20

  • Loading branch information...
commit e4dbe0353fbf611112afba82b5b08aee14157869 1 parent d1cadc4
@davidjrice davidjrice authored
Showing with 67 additions and 0 deletions.
  1. +6 −0 Rakefile
  2. +8 −0 spec/models/fake_spec.rb
  3. +53 −0 spec/spec_helper.rb
View
6 Rakefile
@@ -4,4 +4,10 @@
require File.expand_path('../config/application', __FILE__)
+begin
+ require 'ci/reporter/rake/rspec'
+rescue LoadError
+ STDERR.puts "WARNING: gem ci_reporter not found"
+end
+
LearningPortal::Application.load_tasks
View
8 spec/models/fake_spec.rb
@@ -0,0 +1,8 @@
+require_relative '../spec_helper'
+
+describe "Fake" do
+
+ it "should just pass" do
+ true.should be_true
+ end
+end
View
53 spec/spec_helper.rb
@@ -0,0 +1,53 @@
+require 'rubygems'
+require 'spork'
+#uncomment the following line to use spork with the debugger
+#require 'spork/ext/ruby-debug'
+
+Spork.prefork do
+ # Loading more in this block will cause your tests to run faster. However,
+ # if you change any configuration or code from libraries loaded here, you'll
+ # need to restart spork for it take effect.
+ ENV["RAILS_ENV"] ||= 'test'
+ require File.expand_path("../../config/environment", __FILE__)
+ require 'rspec/rails'
+ require 'rspec/autorun'
+ require 'simplecov'
+ require 'simplecov-rcov'
+ require 'shoulda-matchers'
+ require 'factory_girl_rails'
+ SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+ SimpleCov.start '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
+
+ # 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
+
+end
+
+Spork.each_run do
+ load "#{Rails.root}/config/routes.rb"
+ Dir["#{Rails.root}/app/**/*.rb"].each { |f| load f }
+end
Please sign in to comment.
Something went wrong with that request. Please try again.