From d405e0d8610140a0aa4290c9e6b776366ae09260 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Fri, 17 May 2013 16:01:19 -0700 Subject: [PATCH 1/2] Revert "Require rspec-rails in Gemfile to fix 'spec' task" This reverts commit c6c223d1c9f47d756a08e8064b30e987751f72cd. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f3b442c09..8c546ed4e 100644 --- a/Gemfile +++ b/Gemfile @@ -103,7 +103,7 @@ group :test, :development do gem 'mocha', require: false gem 'rb-fsevent', require: RUBY_PLATFORM =~ /darwin/i ? 'rb-fsevent' : false gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM =~ /linux/i ? 'rb-inotify' : false - gem 'rspec-rails' + gem 'rspec-rails', require: false gem 'shoulda', require: false gem 'simplecov', require: false gem 'terminal-notifier-guard', require: false From 9c092366e024d040ef111afcdd88bec44d483b61 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Fri, 17 May 2013 16:02:43 -0700 Subject: [PATCH 2/2] Add explicit 'spec' rake tasks This doesn't require auto-loading of rspec-rails and puts the 'spec' task in the rake task list (rake -T) --- docs/DEVELOPER-ADVANCED.md | 2 +- lib/tasks/rspec.rake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 lib/tasks/rspec.rake diff --git a/docs/DEVELOPER-ADVANCED.md b/docs/DEVELOPER-ADVANCED.md index fa44aeb79..4e15f6a38 100644 --- a/docs/DEVELOPER-ADVANCED.md +++ b/docs/DEVELOPER-ADVANCED.md @@ -20,7 +20,7 @@ to rails, you are likely much better off with our **[Discourse Vagrant Developer 2. `rake db:migrate` 3. `rake db:test:prepare` 4. `rake db:seed_fu` -5. Try running the specs: `bundle exec rspec` +5. Try running the specs: `bundle exec rake spec` 6. `bundle exec rails server` You should now be able to connect to rails on http://localhost:3000 - try it out! The seed data includes a pinned topic that explains how to get an admin account, so start there! Happy hacking! diff --git a/lib/tasks/rspec.rake b/lib/tasks/rspec.rake new file mode 100644 index 000000000..f7c787bb2 --- /dev/null +++ b/lib/tasks/rspec.rake @@ -0,0 +1,3 @@ +require 'rspec/core/rake_task' + +RSpec::Core::RakeTask.new(:spec)