spec/steps/steps.rb in allure_turnip-0.1.0 vs spec/steps/steps.rb in allure_turnip-0.1.1
- old
+ new
@@ -108,10 +108,15 @@
step "raise error" do
raise "foobar"
end
step 'attach file' do
- attach_file "test-file1", Tempfile.new("test")
+ random = Random.new(Time.now.usec)
+ file = "test-file#{random.rand(10000)}"
+ temp = Tempfile.new(file)
+ temp.print(file)
+ temp.close
+ attach_file file, temp
end
placeholder :count do
match (/\d+/) do |count|
count.to_i