Skip to content

Commit d9931e2

Browse files
author
Austin Schneider
committed
remove spork and guard
1 parent d3a7b90 commit d9931e2

File tree

7 files changed

+90
-189
lines changed

7 files changed

+90
-189
lines changed

Gemfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ group :test do
2828
gem 'webmock', '~> 1.7.5', require: false
2929
gem 'artifice', '~> 0.6'
3030
gem 'timecop', '~> 0.3.5'
31-
gem 'spork', '~> 0.9.0.rc9'
3231
gem 'launchy', '~> 2.0.5'
3332
gem 'resque_spec', '~> 0.7.0'
3433
gem 'factory_girl_rails', '~> 1.3.0'
3534
gem 'faker', '~> 1.0.1'
36-
gem 'guard-spork', '~> 0.3.1'
37-
end
38-
39-
group :development do
40-
gem 'guard', '>= 0.8.8'
4135
end

Gemfile.lock

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ GEM
5151
xpath (~> 0.1.4)
5252
childprocess (0.2.2)
5353
ffi (~> 1.0.6)
54-
coderay (1.0.9)
5554
coffee-rails (3.1.1)
5655
coffee-script (>= 2.2.0)
5756
railties (~> 3.1.0)
@@ -85,18 +84,8 @@ GEM
8584
ffi (1.0.9)
8685
formalize-rails (0.0.5)
8786
railties (~> 3.1.0.rc1)
88-
formatador (0.2.4)
8987
gherkin (2.6.2)
9088
json (>= 1.4.6)
91-
guard (1.8.2)
92-
formatador (>= 0.2.4)
93-
listen (>= 1.0.0)
94-
lumberjack (>= 1.0.2)
95-
pry (>= 0.9.10)
96-
thor (>= 0.14.6)
97-
guard-spork (0.3.2)
98-
guard (>= 0.8.4)
99-
spork (>= 0.8.4)
10089
haml (3.1.3)
10190
haml-rails (0.3.4)
10291
actionpack (~> 3.0)
@@ -117,16 +106,10 @@ GEM
117106
rails (>= 3.0.0)
118107
launchy (2.0.5)
119108
addressable (~> 2.2.6)
120-
listen (1.3.1)
121-
rb-fsevent (>= 0.9.3)
122-
rb-inotify (>= 0.9)
123-
rb-kqueue (>= 0.2)
124-
lumberjack (1.0.4)
125109
mail (2.3.0)
126110
i18n (>= 0.4.0)
127111
mime-types (~> 1.16)
128112
treetop (~> 1.4.8)
129-
method_source (0.8.2)
130113
mime-types (1.17.2)
131114
multi_json (1.0.3)
132115
multi_xml (0.4.1)
@@ -135,10 +118,6 @@ GEM
135118
polyamorous (0.5.0)
136119
activerecord (~> 3.0)
137120
polyglot (0.3.3)
138-
pry (0.9.12.2)
139-
coderay (~> 1.0.5)
140-
method_source (~> 0.8)
141-
slop (~> 3.4)
142121
rack (1.3.5)
143122
rack-cache (1.1)
144123
rack (>= 0.4)
@@ -166,11 +145,6 @@ GEM
166145
rdoc (~> 3.4)
167146
thor (~> 0.14.6)
168147
rake (0.9.2.2)
169-
rb-fsevent (0.9.3)
170-
rb-inotify (0.9.1)
171-
ffi (>= 0.5.0)
172-
rb-kqueue (0.2.0)
173-
ffi (>= 0.5.0)
174148
rdoc (3.11)
175149
json (~> 1.4)
176150
redis (2.2.2)
@@ -223,8 +197,6 @@ GEM
223197
rack-protection (~> 1.1, >= 1.1.2)
224198
tilt (~> 1.3, >= 1.3.3)
225199
tilt (~> 1.3, >= 1.3.3)
226-
slop (3.4.6)
227-
spork (0.9.0.rc9)
228200
sprockets (2.0.3)
229201
hike (~> 1.2)
230202
rack (~> 1.0)
@@ -264,8 +236,6 @@ DEPENDENCIES
264236
factory_girl_rails (~> 1.3.0)
265237
faker (~> 1.0.1)
266238
formalize-rails (= 0.0.5)
267-
guard (>= 0.8.8)
268-
guard-spork (~> 0.3.1)
269239
haml-rails (= 0.3.4)
270240
httparty (= 0.8.1)
271241
jquery-rails (= 1.0.16)
@@ -278,7 +248,6 @@ DEPENDENCIES
278248
resque_spec (~> 0.7.0)
279249
rspec-rails (~> 2.7.0)
280250
sass-rails (~> 3.1.4)
281-
spork (~> 0.9.0.rc9)
282251
squeel (= 0.9.3)
283252
timecop (~> 0.3.5)
284253
uglifier (>= 1.0.3)

Guardfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

config/cucumber.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
33
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
44
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
55
%>
6-
default: --drb <%= std_opts %> features
7-
wip: --drb --tags @wip:3 --wip features
8-
rerun: --drb <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
6+
default: <%= std_opts %> features
7+
wip: --tags @wip:3 --wip features
8+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

features/support/env.rb

Lines changed: 47 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,53 @@
44
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
55
# files.
66

7-
require 'rubygems'
8-
require 'spork'
9-
10-
Spork.prefork do
11-
require 'cucumber/rails'
12-
13-
14-
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
15-
# order to ease the transition to Capybara we set the default here. If you'd
16-
# prefer to use XPath just remove this line and adjust any selectors in your
17-
# steps to use the XPath syntax.
18-
Capybara.default_selector = :css
19-
7+
require 'cucumber/rails'
8+
9+
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
10+
# order to ease the transition to Capybara we set the default here. If you'd
11+
# prefer to use XPath just remove this line and adjust any selectors in your
12+
# steps to use the XPath syntax.
13+
Capybara.default_selector = :css
14+
15+
# By default, any exception happening in your Rails application will bubble up
16+
# to Cucumber so that your scenario will fail. This is a different from how
17+
# your application behaves in the production environment, where an error page will
18+
# be rendered instead.
19+
#
20+
# Sometimes we want to override this default behaviour and allow Rails to rescue
21+
# exceptions and display an error page (just like when the app is running in production).
22+
# Typical scenarios where you want to do this is when you test your error pages.
23+
# There are two ways to allow Rails to rescue exceptions:
24+
#
25+
# 1) Tag your scenario (or feature) with @allow-rescue
26+
#
27+
# 2) Set the value below to true. Beware that doing this globally is not
28+
# recommended as it will mask a lot of errors for you!
29+
#
30+
ActionController::Base.allow_rescue = false
31+
32+
# Remove/comment out the lines below if your app doesn't have a database.
33+
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
34+
begin
35+
DatabaseCleaner.strategy = :transaction
36+
rescue NameError
37+
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
2038
end
2139

22-
Spork.each_run do
23-
# By default, any exception happening in your Rails application will bubble up
24-
# to Cucumber so that your scenario will fail. This is a different from how
25-
# your application behaves in the production environment, where an error page will
26-
# be rendered instead.
27-
#
28-
# Sometimes we want to override this default behaviour and allow Rails to rescue
29-
# exceptions and display an error page (just like when the app is running in production).
30-
# Typical scenarios where you want to do this is when you test your error pages.
31-
# There are two ways to allow Rails to rescue exceptions:
32-
#
33-
# 1) Tag your scenario (or feature) with @allow-rescue
34-
#
35-
# 2) Set the value below to true. Beware that doing this globally is not
36-
# recommended as it will mask a lot of errors for you!
37-
#
38-
ActionController::Base.allow_rescue = false
40+
# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
41+
# See the DatabaseCleaner documentation for details. Example:
42+
#
43+
# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
44+
# DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]}
45+
# end
46+
#
47+
# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
48+
# DatabaseCleaner.strategy = :transaction
49+
# end
50+
#
51+
52+
# Possible values are :truncation and :transaction
53+
# The :transaction strategy is faster, but might give you threading problems.
54+
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
55+
Cucumber::Rails::Database.javascript_strategy = :truncation
3956

40-
# Remove/comment out the lines below if your app doesn't have a database.
41-
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
42-
begin
43-
DatabaseCleaner.strategy = :transaction
44-
rescue NameError
45-
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
46-
end
47-
48-
# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
49-
# See the DatabaseCleaner documentation for details. Example:
50-
#
51-
# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
52-
# DatabaseCleaner.strategy = :truncation, {except: %w[widgets]}
53-
# end
54-
#
55-
# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
56-
# DatabaseCleaner.strategy = :transaction
57-
# end
58-
#
59-
60-
# Possible values are :truncation and :transaction
61-
# The :transaction strategy is faster, but might give you threading problems.
62-
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
63-
Cucumber::Rails::Database.javascript_strategy = :truncation
64-
65-
end

lib/tasks/cucumber.rake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ begin
1414
require 'cucumber/rake/task'
1515

1616
namespace :cucumber do
17-
Cucumber::Rake::Task.new({ok: 'db:test:prepare'}, 'Run features that should pass') do |t|
17+
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
1818
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
1919
t.fork = true # You may get faster startup if you set this to false
2020
t.profile = 'default'
2121
end
2222

23-
Cucumber::Rake::Task.new({wip: 'db:test:prepare'}, 'Run features that are being worked on') do |t|
23+
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
2424
t.binary = vendored_cucumber_bin
2525
t.fork = true # You may get faster startup if you set this to false
2626
t.profile = 'wip'
2727
end
2828

29-
Cucumber::Rake::Task.new({rerun: 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
29+
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
3030
t.binary = vendored_cucumber_bin
3131
t.fork = true # You may get faster startup if you set this to false
3232
t.profile = 'rerun'
3333
end
3434

3535
desc 'Run all features'
36-
task all: [:ok, :wip]
36+
task :all => [:ok, :wip]
3737

3838
task :statsetup do
3939
require 'rails/code_statistics'
@@ -42,19 +42,19 @@ begin
4242
end
4343
end
4444
desc 'Alias for cucumber:ok'
45-
task cucumber: 'cucumber:ok'
45+
task :cucumber => 'cucumber:ok'
4646

47-
task default: :cucumber
47+
task :default => :cucumber
4848

49-
task features: :cucumber do
49+
task :features => :cucumber do
5050
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
5151
end
5252

5353
# In case we don't have ActiveRecord, append a no-op task that we can depend upon.
5454
task 'db:test:prepare' do
5555
end
5656

57-
task stats: 'cucumber:statsetup'
57+
task :stats => 'cucumber:statsetup'
5858
rescue LoadError
5959
desc 'cucumber rake task not available (cucumber not installed)'
6060
task :cucumber do

0 commit comments

Comments
 (0)