Sha256: baee7ad041e90952c546c3ca5bbb039dfe26d5d3eba6c468aaa3f0564e59e6a8
Contents?: true
Size: 953 Bytes
Versions: 6
Compression:
Stored size: 953 Bytes
Contents
require_relative '../rspec/spec_helper' describe "Check output files" do it "There are as many xml files as feature files without blank file" do feature_count = Dir.glob(File.join(__dir__, '../spec/**/*.feature')).select {|file| File.basename(file) != 'blank.feature' }.count xml_count = Dir.glob(File.join(__dir__, '../allure/*.xml')).count puts "feature_count:#{feature_count}" puts "xml_count:#{xml_count}#" expect(xml_count).to eq(feature_count) end it "attach file step create a file" do step_count = 0 Dir.glob(File.join(__dir__, '../spec/**/*.feature')).each do |path| File.open(path,"r") do |file| file.read.scan(/attach file/) do step_count += 1 end end end file_count = Dir.glob(File.join(__dir__, '../allure/*-attachment')).count puts "file_count:#{file_count}#" puts "step_count:#{step_count}#" expect(file_count).to eq(step_count) end end
Version data entries
6 entries across 6 versions & 1 rubygems