File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,19 @@ namespace :test do
50
50
namespace :isolated do
51
51
desc 'Run isolated tests for Railtie'
52
52
task :railtie do
53
+ require 'shellwords'
53
54
dir = File . dirname ( __FILE__ )
54
- file = "#{ dir } /test/active_model_serializers/railtie_test_isolated.rb"
55
+ file = Shellwords . shellescape ( "#{ dir } /test/active_model_serializers/railtie_test_isolated.rb" )
56
+ dir = Shellwords . shellescape ( dir )
55
57
56
58
# https://github.com/rails/rails/blob/3d590add45/railties/lib/rails/generators/app_base.rb#L345-L363
57
59
_bundle_command = Gem . bin_path ( 'bundler' , 'bundle' )
58
60
require 'bundler'
59
61
Bundler . with_clean_env do
60
62
command = "-w -I#{ dir } /lib -I#{ dir } /test #{ file } "
61
63
full_command = %("#{ Gem . ruby } " #{ command } )
62
- system ( full_command ) or fail 'Failures' # rubocop:disable Style/AndOr
64
+ system ( full_command ) or # rubocop:disable Style/AndOr
65
+ fail 'Failures'
63
66
end
64
67
end
65
68
end
You can’t perform that action at this time.
0 commit comments