Skip to content

Commit

Permalink
test: don't use test-unit-rr
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 12, 2024
1 parent 687e6db commit 18b696a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ end

group :test do
gem "test-unit"
gem "test-unit-rr"
end
3 changes: 1 addition & 2 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2004-2019 Kouhei Sutou <[email protected]>
# Copyright (C) 2004-2024 Sutou Kouhei <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,6 @@
require "tmpdir"

require "test-unit"
require "test/unit/rr"

require "helper/fixture"
require "helper/parser"
27 changes: 15 additions & 12 deletions test/test-readme-parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2013 Kouhei Sutou <[email protected]>
# Copyright (C) 2012-2024 Sutou Kouhei <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -30,17 +30,20 @@ def setup

private
def assert_parse(content, extension=nil)
readme_path = "README#{extension}"
stub(File).read(readme_path) {content}
@parser.parse(readme_path)
assert_equal({
:title => @title,
:description => @description,
},
{
:title => @parser.title,
:description => @parser.description,
})
Tempfile.create(["README", extension]) do |readme_file|
readme_file.print(content)
readme_file.close

@parser.parse(readme_file.path)
assert_equal({
:title => @title,
:description => @description,
},
{
:title => @parser.title,
:description => @parser.description,
})
end
end

class TestRD < self
Expand Down

0 comments on commit 18b696a

Please sign in to comment.