File tree 8 files changed +33
-6
lines changed
8 files changed +33
-6
lines changed Original file line number Diff line number Diff line change 1
1
--require spec_helper
2
+ --require turnip/rspec
2
3
--format Fuubar
3
4
--color
4
5
--profile
Original file line number Diff line number Diff line change
1
+ --require spec_helper
2
+ --format documentation
3
+ --color
4
+ --no-profile
Original file line number Diff line number Diff line change @@ -169,8 +169,10 @@ group :test do
169
169
# gem 'rspec-its'
170
170
gem 'capybara'
171
171
gem 'capybara-screenshot'
172
+ gem 'turnip' # write rspec feature specs in cucumber style
172
173
gem 'rack_session_access' # allows to set session from within Capybara
173
174
gem 'poltergeist' # headless js driver for Capybara that uses phantomJs
175
+ gem 'selenium-webdriver' # headfull js driver for Capybara
174
176
gem 'codeclimate-test-reporter' , require : false
175
177
gem 'database_cleaner'
176
178
gem 'fuubar' , '2.0.0.rc1'
Original file line number Diff line number Diff line change 137
137
carrierwave (~> 0.5 )
138
138
celluloid (0.15.2 )
139
139
timers (~> 1.1.0 )
140
+ childprocess (0.5.5 )
141
+ ffi (~> 1.0 , >= 1.0.11 )
140
142
choice (0.1.6 )
141
143
chronic (0.10.2 )
142
144
chunky_png (1.3.1 )
277
279
multi_json (~> 1.0 )
278
280
net-http-persistent (>= 2.7 )
279
281
net-http-pipeline
282
+ gherkin (2.12.2 )
283
+ multi_json (~> 1.3 )
280
284
github-markdown (0.6.6 )
281
285
grackle (0.3.0 )
282
286
json
591
595
ruby-progressbar (1.5.1 )
592
596
ruby_parser (3.6.2 )
593
597
sexp_processor (~> 4.1 )
598
+ rubyzip (1.1.6 )
594
599
safe_yaml (1.0.3 )
595
600
sanitize (3.0.0 )
596
601
crass (~> 0.2.0 )
606
611
faraday (~> 0.8 , < 0.10 )
607
612
sax-machine (0.2.1 )
608
613
nokogiri (~> 1.6.0 )
614
+ selenium-webdriver (2.43.0 )
615
+ childprocess (~> 0.5 )
616
+ multi_json (~> 1.0 )
617
+ rubyzip (~> 1.0 )
618
+ websocket (~> 1.0 )
609
619
sexp_processor (4.4.4 )
610
620
shoulda-matchers (2.6.2 )
611
621
activesupport (>= 3.0.0 )
686
696
treetop (1.4.15 )
687
697
polyglot
688
698
polyglot (>= 0.3.1 )
699
+ turnip (1.2.4 )
700
+ gherkin (>= 2.5 )
701
+ rspec (>= 2.14.0 , < 4.0 )
689
702
tweet-button (0.1.0 )
690
703
twitter (5.5.1 )
691
704
addressable (~> 2.3 )
@@ -813,6 +826,7 @@ DEPENDENCIES
813
826
sanitize
814
827
sass (~> 3.2.9 )
815
828
sass-rails (~> 3.2.6 )
829
+ selenium-webdriver
816
830
shoulda-matchers
817
831
sidekiq
818
832
simple_form
@@ -829,6 +843,7 @@ DEPENDENCIES
829
843
timecop
830
844
tire
831
845
travis
846
+ turnip
832
847
tweet-button
833
848
twitter
834
849
uglifier (>= 1.0.3 )
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ class ApplicationController < ActionController::Base
21
21
after_action :record_visit
22
22
after_action :record_location
23
23
24
+ rescue_from ActiveRecord ::RecordNotFound , with : :render_404 unless Rails . env . production?
25
+ rescue_from ActionController ::RoutingError , with : :render_404 unless Rails . env . production?
26
+
24
27
protected
25
28
26
29
def apply_flash_message
@@ -179,9 +182,6 @@ def not_on_achievements?
179
182
params [ :controller ] != 'achievements'
180
183
end
181
184
182
- rescue_from ActiveRecord ::RecordNotFound , with : :render_404
183
- rescue_from ActionController ::RoutingError , with : :render_404
184
-
185
185
def render_404
186
186
render template : 'error/not_found' , status : :not_found
187
187
end
Original file line number Diff line number Diff line change 13
13
14
14
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
15
15
config . assets . allow_debugging = true
16
-
17
- config . middleware . use RackSessionAccess ::Middleware # alloes to set session from within Capybara
16
+ config . middleware . use RackSessionAccess ::Middleware # allows to set session from within Capybara
18
17
19
18
Rails . logger = Logger . new ( STDOUT )
20
- Rails . logger . level = Logger ::DEBUG # provides more verbose output when testing with headless browsers in case of errors
19
+ Rails . logger . level = Logger ::DEBUG
21
20
end
Original file line number Diff line number Diff line change 1
1
require 'spec_helper.rb'
2
2
require 'capybara/poltergeist'
3
+ require 'capybara-screenshot/rspec'
3
4
require 'rack_session_access/capybara'
5
+ require 'features/helpers/general_helpers.rb'
4
6
5
7
Capybara . javascript_driver = :poltergeist
6
8
Capybara . default_wait_time = 5
Original file line number Diff line number Diff line change
1
+ require 'rails_helper.rb'
2
+ require 'turnip/capybara'
3
+
4
+ Dir . glob ( "spec/features/steps/**/*steps.rb" ) { |file | load file , true }
You can’t perform that action at this time.
0 commit comments