test/test_source.rb in pdd-0.23.2 vs test/test_source.rb in pdd-0.24.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2014-2023 Yegor Bugayenko +# Copyright (c) 2014-2024 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -24,11 +24,11 @@ require_relative '../lib/pdd/sources' require_relative 'test__helper' # Source test. # Author:: Yegor Bugayenko (yegor256@gmail.com) -# Copyright:: Copyright (c) 2014-2023 Yegor Bugayenko +# Copyright:: Copyright (c) 2014-2024 Yegor Bugayenko # License:: MIT class TestSource < Minitest::Test def test_parsing Dir.mktmpdir 'test' do |dir| file = File.join(dir, 'a.txt') @@ -46,11 +46,11 @@ stub_source_find_github_user(file, 'hey') do |source| list = source.puzzles assert_equal 2, list.size puzzle = list.first assert_equal '2-3', puzzle.props[:lines] - assert_equal 'привет, how are you doing?', \ + assert_equal 'привет, how are you doing?', puzzle.props[:body] assert_equal '44', puzzle.props[:ticket] assert puzzle.props[:author].nil? assert puzzle.props[:email].nil? assert puzzle.props[:time].nil? @@ -134,19 +134,19 @@ " /* * \x40todo #1 First one with * a few lines * \x40todo #1 Second one also - * with a few lines + * with a few lines of text */ " ) stub_source_find_github_user(file, 'hey') do |source| PDD.opts = nil assert_equal 2, source.puzzles.size puzzle = source.puzzles.last assert_equal '5-6', puzzle.props[:lines] - assert_equal 'Second one also with a few lines', puzzle.props[:body] + assert_equal 'Second one also with a few lines of text', puzzle.props[:body] assert_equal '1', puzzle.props[:ticket] end end end