Skip to content

Commit

Permalink
Removed spork. Moving to zeus and want less dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Glen committed Feb 13, 2014
1 parent 0d2284e commit b571da0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec/dummy/log/*.log
spec/dummy/tmp/
spec/dummy/.sass-cache
spec/dummy/.rvmrc
spec/dummy/public/system/
Gemfile.lock
tmp/
# ignore simplecov output
coverage
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--format Fuubar
--color
--drb
15 changes: 0 additions & 15 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
guard 'spork', :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 }
watch(%r{^lib/(.+)\.rb$}) { :rspec }
watch(%r{^spec/support/(.+)\.rb$}) { :rspec }
watch(%r{^spec/support/(.+)/(.+)\.rb$}) { :rspec }
end

guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
Expand Down
16 changes: 0 additions & 16 deletions bin/spork

This file was deleted.

8 changes: 3 additions & 5 deletions smithycms.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
Expand Down Expand Up @@ -39,18 +40,17 @@ Gem::Specification.new do |s|
s.add_dependency 'slodown'
s.add_dependency 'rack-cache'

s.add_development_dependency 'byebug'
s.add_development_dependency 'capybara', '~> 2.2.1'
s.add_development_dependency 'coveralls'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'byebug'
s.add_development_dependency 'factory_girl_rails', '~> 4.3.0'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'fakeweb'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'fuubar'
s.add_development_dependency 'guard', '~> 2.3.0'
s.add_development_dependency 'guard-livereload'
s.add_development_dependency 'guard-rspec'
s.add_development_dependency 'guard-spork'
s.add_development_dependency 'launchy'
s.add_development_dependency 'letter_opener'
s.add_development_dependency 'mysql2'
Expand All @@ -59,9 +59,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec-rails', '~> 2.14'
s.add_development_dependency 'rb-fsevent'
s.add_development_dependency 'shoulda-matchers'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'smithycms-auth'
s.add_development_dependency 'spork', '~> 1.0rc'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'terminal-notifier-guard'
s.extra_rdoc_files = [ "README.md" ]
Expand Down
90 changes: 37 additions & 53 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,58 +1,42 @@
require 'rubygems'

require 'coveralls'
Coveralls.wear! if ENV['TRAVIS']

require 'spork'

# uncomment the following line to use spork with the debugger
# require 'spork/ext/ruby-debug'

Spork.prefork do
# simplecov
# unless ENV['DRB']
# require 'simplecov'
# SimpleCov.start 'rails'
# end
# 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("../../spec/dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'

# Run any available migration
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each { |f| require f }

RSpec.configure do |config|
config.use_transactional_fixtures = false
# config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.infer_base_class_for_anonymous_controllers = false
config.treat_symbols_as_metadata_keys_with_true_values = true
config.order = "random"
# Filter specs to only run focus specs
config.filter_run :focus => true
# if none are focused, run everything
config.run_all_when_everything_filtered = true
# include the routes url_helpers
config.before do
@routes = Smithy::Engine.routes
# for rspec >= 2.13
assertion_instance.instance_variable_set(:@routes, Smithy::Engine.routes) if respond_to?(:assertion_instance)
end
end
if ENV['TRAVIS']
require 'coveralls'
Coveralls.wear!
end

Spork.each_run do
# simplecov
# if ENV['DRB']
# require 'simplecov'
# SimpleCov.start 'rails'
# end
FactoryGirl.reload
# 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("../../spec/dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'

# Run any available migration
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each { |f| require f }

RSpec.configure do |config|
config.use_transactional_fixtures = false
# config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.infer_base_class_for_anonymous_controllers = false
config.treat_symbols_as_metadata_keys_with_true_values = true
config.order = "random"
# Filter specs to only run focus specs
config.filter_run :focus => true
# if none are focused, run everything
config.run_all_when_everything_filtered = true
# include the routes url_helpers
config.before(:suite) do
FactoryGirl.reload
end
config.before do
@routes = Smithy::Engine.routes
# for rspec >= 2.13
assertion_instance.instance_variable_set(:@routes, Smithy::Engine.routes) if respond_to?(:assertion_instance)
end
end
1 change: 1 addition & 0 deletions spec/support/factory_girl.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'factory_girl'
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
end

0 comments on commit b571da0

Please sign in to comment.