features/step_definitions/steps.rb in jekyll-chatgpt-translate-0.0.43 vs features/step_definitions/steps.rb in jekyll-chatgpt-translate-0.0.44

- old
+ new

@@ -51,9 +51,13 @@ Then('File {string} exists') do |string| raise "The file \"#{string}\" is absent:\n#{`tree -s`}" unless File.exist?(string) end +Then('File {string} doesn\'t exist') do |string| + raise "The file \"#{string}\" is present:\n#{`tree -s`}" if File.exist?(string) +end + Then('File {string} contains {string}') do |string, string2| raise "The file \"#{string}\" is absent" unless File.exist?(string) content = File.read(string) raise "The file \"#{string}\" doesn't contain \"#{string2}\":\n#{content}" unless content.include?(string2) end