Last active
March 1, 2024 08:01
Revisions
-
jcasimir revised this gist
Mar 5, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ test/coverage/ -
jcasimir created this gist
Mar 5, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ require 'rake/testtask' Rake::TestTask.new do |t| t.pattern = "test/**/*_test.rb" # This expects your tests to be inside a test subfolder end # and end with '_test.rb` # Run all your test files from the terminal with "rake test" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ require 'simplecov' # These two lines must go first SimpleCov.start require 'minitest/autorun' # Sets up minitest # You could require other shared gems here, too This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ class YourClass # Nothing special/unusual here end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ require_relative 'test_helper' # require test_helper first require_relative 'your_class' # require whatever class(es) you're testing class YourClassTest < Minitest::Test def test_it_does_stuff # write your tests like normal assert_equal 100, 100 end end