mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
(maint) Lift #redis definition into spec helper library
This commit is contained in:
parent
e4aa311834
commit
ea9fd004d6
5 changed files with 5 additions and 20 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
def expect_json(
|
def redis
|
||||||
ok = true,
|
@redis ||= Redis.new
|
||||||
http = 200
|
end
|
||||||
)
|
|
||||||
|
def expect_json(ok = true, http = 200)
|
||||||
expect(last_response.header['Content-Type']).to eq('application/json')
|
expect(last_response.header['Content-Type']).to eq('application/json')
|
||||||
|
|
||||||
if (ok == true) then
|
if (ok == true) then
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def redis
|
|
||||||
@redis ||= Redis.new
|
|
||||||
end
|
|
||||||
|
|
||||||
describe Vmpooler::API::V1 do
|
describe Vmpooler::API::V1 do
|
||||||
include Rack::Test::Methods
|
include Rack::Test::Methods
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def redis
|
|
||||||
@redis ||= Redis.new
|
|
||||||
end
|
|
||||||
|
|
||||||
describe Vmpooler::API::V1 do
|
describe Vmpooler::API::V1 do
|
||||||
include Rack::Test::Methods
|
include Rack::Test::Methods
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def redis
|
|
||||||
@redis ||= Redis.new
|
|
||||||
end
|
|
||||||
|
|
||||||
describe Vmpooler::API::V1 do
|
describe Vmpooler::API::V1 do
|
||||||
include Rack::Test::Methods
|
include Rack::Test::Methods
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def redis
|
|
||||||
@redis ||= Redis.new
|
|
||||||
end
|
|
||||||
|
|
||||||
describe Vmpooler::API::V1 do
|
describe Vmpooler::API::V1 do
|
||||||
include Rack::Test::Methods
|
include Rack::Test::Methods
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue