class GemHadar

def test_task

extensions are present.
The task also conditionally depends on the :compile task if project
the load path, specifies the test files to run, and enables verbose output.
using Rake::TestTask. It includes the test directory and required paths in
This method configures a Rake task named :test that runs the test suite

suite.
The test_task method sets up a Rake task for executing the project's test
def test_task
  tt =  Rake::TestTask.new(:run_tests) do |t|
    t.libs << test_dir
    t.libs.concat require_paths.to_a
    t.test_files = test_files
    t.verbose    = true
  end
  desc 'Run the tests'
  task :test => [ (:compile if extensions.full?), tt.name ].compact
end