test/test_prompt.rb in jekyll-chatgpt-translate-0.0.19 vs test/test_prompt.rb in jekyll-chatgpt-translate-0.0.20
- old
+ new
@@ -21,18 +21,23 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
require 'minitest/autorun'
+require_relative 'test__helper'
require_relative '../lib/jekyll-chatgpt-translate/prompt'
# Prompt test.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2023 Yegor Bugayenko
# License:: MIT
class GptTranslate::PromptTest < Minitest::Test
def par(body, source, target)
- "Please, translate the following paragraph from #{source} to #{target}, don't change proper nouns:\n\n#{body}"
+ [
+ 'Please, translate the following Markdown paragraph',
+ " from #{source} to #{target},",
+ " don't translate technical terms and proper nouns:\n\n#{body}"
+ ].join
end
def test_english_to_russian
assert_equal(
par('Hello, dude!', 'English', 'Russian'),