I've got pure Ruby App for which I wrote few minitests. For example below test works well:
require 'pry'
require 'minitest/autorun'
require 'active_support'
require_relative '../../../../src/parsers/incoming_events/continue_quiz'
module Parsers
module IncomingEvents
class ContinueQuizTest < ActiveSupport::TestCase
test 'parse JSON to Lexis Nexis format' do
assert_equal expected_hash, service.call
end
private
def service
@service ||= ::Parsers::IncomingEvents::ContinueQuiz.new(event: event)
end
def event
File.read('test/fixtures/files/continue_event.json')
end
def expected_hash
JSON.parse(File.read('test/fixtures/files/incoming_events/continue_expected_result.json'))
end
end
end
end
To run this thing I need to write this command in the console ruby test/src/parsers/responses/continue_quiz_test.rb
which is a little annoying because I have 10 of these tests. Is it possible to run all the tests at once from the "test" folder?
I was hoping for the ruby test test/
command but my guess is that this is some kind of Rails magic command.