Allow running specs from any directory (#609)

This commit is contained in:
Oleh Prypin 2021-04-11 11:17:50 +02:00 committed by GitHub
parent d237d3ef7d
commit 926206a46c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -100,7 +100,7 @@ describe "Macros" do
describe "#send_file" do
it "sends file with given path and default mime-type" do
get "/" do |env|
send_file env, "./spec/asset/hello.ecr"
send_file env, "#{__DIR__}/asset/hello.ecr"
end
request = HTTP::Request.new("GET", "/")
@ -112,7 +112,7 @@ describe "Macros" do
it "sends file with given path and given mime-type" do
get "/" do |env|
send_file env, "./spec/asset/hello.ecr", "image/jpeg"
send_file env, "#{__DIR__}/asset/hello.ecr", "image/jpeg"
end
request = HTTP::Request.new("GET", "/")
@ -136,7 +136,7 @@ describe "Macros" do
it "sends file with given path and given filename" do
get "/" do |env|
send_file env, "./spec/asset/hello.ecr", filename: "image.jpg"
send_file env, "#{__DIR__}/asset/hello.ecr", filename: "image.jpg"
end
request = HTTP::Request.new("GET", "/")