I've got a Rails project with a test suite that uses Test::Unit. I'm trying to set up Guard and Spork to run my tests automatically and fire notifications on pass/fail; Guard and Spork are running fine, and fire a notification when they start up, but I can't get any test notifications to work. I've tried using both Growl and Mac OS X notifications with terminal-notifier-guard.
Here's the relevant part of my Gemfile:
group :test do
gem 'sqlite3'
gem 'selenium-webdriver'
gem 'rr', :require => false
gem 'capybara'
gem 'database_cleaner'
gem 'timecop'
end
group :test, :development do
gem 'guard'
gem 'spork'
gem 'spork-testunit'
gem 'guard-test'
gem 'guard-rake'
gem 'guard-spork'
gem 'terminal-notifier-guard', :require => false
gem 'rb-inotify', require: false
gem 'rb-fsevent', require: false
gem 'rb-fchange', require: false
end
And test_helper.rb:
# -*- encoding : utf-8 -*-
require 'rubygems'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'spork'
Spork.prefork do
require 'rubygems'
ENV["RAILS_ENV"] = "test"
require 'capybara/rails'
require 'database_cleaner'
require 'rr'
require 'ostruct'
require "#{Rails.root}/test/test_support"
class ActionController::TestCase
include Devise::TestHelpers
def teardown
super
Timecop.return
end
end
class ActionDispatch::IntegrationTest
self.use_transactional_fixtures = false
include Capybara::DSL
Capybara.default_driver = :selenium
DatabaseCleaner.strategy = :truncation
def setup
super
DatabaseCleaner.clean
end
def teardown
super
DatabaseCleaner.clean
Timecop.return
end
def login_admin(admin=nil)
admin = Admin.create!(:email => "super_badass@wickedawesome.com", :password => "sloppy") if !admin
visit "/admins/sign_in"
fill_in "admin_email", :with => admin.email
fill_in "admin_password", :with => admin.password
click_on "log in"
admin
end
end
end
Spork.each_run do
# This code will be run each time you run your specs.
end
I'm at a loss. Any help would be greatly appreciated.