Skip to content

Commit

Permalink
Use minitest-power_assert for better visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikurube committed Dec 19, 2024
1 parent fa1de56 commit e23800e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ source "https://rubygems.org"

gem 'minitest', '~> 5.18.0'
gem 'octokit', '~> 6.1'
gem 'minitest-power_assert', '~> 0.3.1'
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ GEM
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
minitest (5.18.0)
minitest-power_assert (0.3.1)
minitest
power_assert (>= 1.1)
octokit (6.1.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
power_assert (2.0.4)
public_suffix (5.0.1)
ruby2_keywords (0.0.5)
sawyer (0.9.2)
Expand All @@ -23,6 +27,7 @@ PLATFORMS

DEPENDENCIES
minitest (~> 5.18.0)
minitest-power_assert (~> 0.3.1)
octokit (~> 6.1)

BUNDLED WITH
Expand Down
7 changes: 3 additions & 4 deletions audit.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# coding: utf-8
require 'octokit'
require 'minitest'
require 'minitest/power_assert'
require 'pathname'
require 'yaml'

SCRIPT_PATH = Pathname.new(__dir__)

include Minitest::Assertions
include Minitest::PowerAssert::Assertions

class << self
attr_accessor :assertions
Expand All @@ -31,7 +33,7 @@ def retrieve_github_token()
end

def assert_repos(expected_repos, actual_repos)
assert_equal expected_repos, actual_repos
assert { expected_repos == actual_repos }
end

def load_expected_repos(repos_yaml)
Expand Down Expand Up @@ -71,7 +73,4 @@ def load_actual_repos(access_token)
expected_repos = load_expected_repos("repos.yaml")
actual_repos = load_actual_repos(retrieve_github_token())

puts actual_repos
puts expected_repos

assert_repos(expected_repos, actual_repos)

0 comments on commit e23800e

Please sign in to comment.