Trying to fix specs when run on Travis
This commit is contained in:
parent
9ba85446ef
commit
409628c9e7
@ -32,6 +32,11 @@ test:
|
||||
cs_binaries: rs.binaries.test
|
||||
authorizations: rs_authorizations_test
|
||||
opslog: rs_opslog_test
|
||||
swift:
|
||||
host: "https://swift.example.com"
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
|
||||
staging:
|
||||
<<: *defaults
|
||||
|
@ -251,7 +251,7 @@ describe "Directories" do
|
||||
context "charset given in content-type header" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg; charset=binary"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/tasks/jaypeg.jpg", @image
|
||||
end
|
||||
@ -273,7 +273,7 @@ describe "Directories" do
|
||||
context "no charset in content-type header" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/tasks/jaypeg.jpg", @image
|
||||
end
|
||||
|
@ -446,7 +446,7 @@ describe "App with Riak backend" do
|
||||
context "binary charset in content-type header" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg; charset=binary"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/documents/jaypeg", @image
|
||||
end
|
||||
@ -502,7 +502,7 @@ describe "App with Riak backend" do
|
||||
context "overwriting existing file with same file" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg; charset=binary"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/documents/jaypeg", @image
|
||||
end
|
||||
@ -518,7 +518,7 @@ describe "App with Riak backend" do
|
||||
context "overwriting existing file with different file" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg; charset=binary"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/documents/jaypeg", @image+"foo"
|
||||
end
|
||||
@ -540,7 +540,7 @@ describe "App with Riak backend" do
|
||||
context "no binary charset in content-type header" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/documents/jaypeg", @image
|
||||
end
|
||||
@ -705,7 +705,7 @@ describe "App with Riak backend" do
|
||||
context "binary data" do
|
||||
before do
|
||||
header "Content-Type", "image/jpeg; charset=binary"
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||
@image = File.open(filename, "r").read
|
||||
put "/jimmy/documents/jaypeg", @image
|
||||
|
||||
|
@ -33,6 +33,7 @@ end
|
||||
|
||||
alias context describe
|
||||
|
||||
if app.settings.respond_to? :redis
|
||||
def redis
|
||||
@redis ||= Redis.new(host: app.settings.redis["host"], port: app.settings.redis["port"])
|
||||
end
|
||||
@ -42,6 +43,7 @@ def purge_redis
|
||||
redis.del key
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if app.settings.respond_to? :riak
|
||||
::Riak.disable_list_keys_warnings = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user