Created
February 1, 2021 06:21
-
-
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
This file contains 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 characters
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