bin/check-rspec.rb in sensu-plugins-rspec-0.0.3 vs bin/check-rspec.rb in sensu-plugins-rspec-1.0.0
- old
+ new
@@ -90,10 +90,10 @@
def send_warning(check_name, msg)
d = { 'name' => check_name, 'status' => 1, 'output' => "WARNING: #{msg}", 'handler' => config[:handler] }
sensu_client_socket d.to_json
end
- def run # rubocop:disable AbcSize
+ def run
cd = "cd #{config[:tests_dir]};"
run = "#{config[:environment_variables]} #{config[:ruby_bin]} -S #{config[:rspec_bin]} #{config[:spec_dir]} -f json"
rspec_results = `#{cd} #{run}`
parsed = JSON.parse(rspec_results)