(maint) Lift #redis definition into spec helper library

This commit is contained in:
Rick Bradley 2016-06-01 14:15:59 -05:00
parent e4aa311834
commit ea9fd004d6
5 changed files with 5 additions and 20 deletions

View file

@ -1,7 +1,8 @@
def expect_json(
ok = true,
http = 200
)
def redis
@redis ||= Redis.new
end
def expect_json(ok = true, http = 200)
expect(last_response.header['Content-Type']).to eq('application/json')
if (ok == true) then

View file

@ -11,10 +11,6 @@ module Vmpooler
end
end
def redis
@redis ||= Redis.new
end
describe Vmpooler::API::V1 do
include Rack::Test::Methods

View file

@ -11,10 +11,6 @@ module Vmpooler
end
end
def redis
@redis ||= Redis.new
end
describe Vmpooler::API::V1 do
include Rack::Test::Methods

View file

@ -11,10 +11,6 @@ module Vmpooler
end
end
def redis
@redis ||= Redis.new
end
describe Vmpooler::API::V1 do
include Rack::Test::Methods

View file

@ -11,10 +11,6 @@ module Vmpooler
end
end
def redis
@redis ||= Redis.new
end
describe Vmpooler::API::V1 do
include Rack::Test::Methods