Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
update test infrastructure:
Browse files Browse the repository at this point in the history
* replace rspec with minitest-spec
* remove spork
* add simplecov
  • Loading branch information
phlipper committed Jul 12, 2012
1 parent d7cde23 commit 6a599ae
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 65 deletions.
36 changes: 13 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@ GEM
xpath (~> 0.1.4)
childprocess (0.3.3)
ffi (~> 1.0.6)
diff-lcs (1.1.3)
erubis (2.7.0)
ffi (1.0.11)
guard (1.2.3)
listen (>= 0.4.2)
thor (>= 0.14.6)
guard-rspec (1.2.0)
guard (>= 1.1)
guard-spork (1.1.0)
guard (>= 1.1)
spork (>= 0.8.4)
guard-minitest (0.5.0)
guard (>= 0.4)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
Expand All @@ -75,6 +71,10 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
minitest (3.2.0)
minitest-spec-rails (3.0.5)
minitest
rails (~> 3.0)
multi_json (1.3.6)
nokogiri (1.5.5)
polyglot (0.3.3)
Expand Down Expand Up @@ -108,26 +108,16 @@ GEM
ffi (>= 0.5.0)
rdoc (3.12)
json (~> 1.4)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
rubyzip (0.9.9)
selenium-webdriver (2.24.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
spork (0.9.2)
simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
Expand All @@ -148,8 +138,8 @@ PLATFORMS
DEPENDENCIES
capybara
dead_letter_office!
guard-rspec
guard-spork
guard-minitest
jquery-rails
rspec-rails
minitest-spec-rails
simplecov
sqlite3
14 changes: 1 addition & 13 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
guard "spork", cucumber_env: { "RAILS_ENV" => "test" }, rspec_env: { "RAILS_ENV" => "test" } do
watch("config/application.rb")
watch("config/environment.rb")
watch("config/environments/test.rb")
watch(%r{^config/initializers/.+\.rb$})
watch("Gemfile")
watch("Gemfile.lock")
watch("spec/spec_helper.rb") { :rspec }
watch("test/test_helper.rb") { :test_unit }
watch(%r{features/support/}) { :cucumber }
end

guard "rspec", cli: "--color --drb", version: 2 do
guard "minitest" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch("spec/spec_helper.rb") { "spec" }
Expand Down
8 changes: 4 additions & 4 deletions dead_letter_office.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Gem::Specification.new do |s|
s.summary = "This project implements a Dead letter office for your Rails 3 application."
s.description = "Undeliverable emails (deliveries which raise exceptions) will be logged to the database and can be viewed via a mountable web interface."

s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"]

s.add_dependency "rails", "~> 3.2.6"

s.add_development_dependency "capybara"
s.add_development_dependency "guard-rspec"
s.add_development_dependency "guard-spork"
s.add_development_dependency "rspec-rails"
s.add_development_dependency "guard-minitest"
s.add_development_dependency "minitest-spec-rails"
s.add_development_dependency "sqlite3"
s.add_development_dependency "simplecov"
end
34 changes: 9 additions & 25 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
require "spork"
require "simplecov"
SimpleCov.add_filter "spec"
SimpleCov.command_name "MiniTest"
SimpleCov.start "rails"

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("../dummy/config/environment", __FILE__)
require "minitest/autorun"
require "minitest/pride"

ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../dummy/config/environment", __FILE__)
require "rspec/rails"
require "rspec/autorun"

Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
end

end

Spork.each_run do
# This code will be run each time you run your specs.

end
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

0 comments on commit 6a599ae

Please sign in to comment.