Skip to content

Instantly share code, notes, and snippets.

@Markhenn
Created February 1, 2021 06:21
Show Gist options
  • Save Markhenn/f696c335e2e5cc3792a5e7a1da9e4cd4 to your computer and use it in GitHub Desktop.
Save Markhenn/f696c335e2e5cc3792a5e7a1da9e4cd4 to your computer and use it in GitHub Desktop.
[MiniTest Basic Set up] The Basic set up for mini test with vanilla ruby
require 'minitest/autorun'
require 'minitest/reporters' # optional
MiniTest::Reporters.use! # optional
require_relative 'path/to/app.rb'
class ClassTest < MiniTest::Test
def setup
# set up before each test
end
def teardown
# do after each test
end
def test_method_name
assert_equal 200, last_response.status
assert_includes last_response.body, 'monthly budget'
assert_includes last_response.body, 'Change Budget'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment