mirror of
https://github.com/puppetlabs/vmpooler-dns-gcp.git
synced 2026-01-26 02:58:42 -05:00
Add rspec tests
This commit is contained in:
parent
103a73b298
commit
fb8c168751
6 changed files with 376 additions and 19 deletions
14
spec/helpers.rb
Normal file
14
spec/helpers.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'mock_redis'
|
||||
|
||||
def redis
|
||||
@redis ||= MockRedis.new
|
||||
@redis
|
||||
end
|
||||
|
||||
# Mock an object which represents a Logger. This stops the proliferation
|
||||
# of allow(logger).to .... expectations in tests.
|
||||
class MockLogger
|
||||
def log(_level, string); end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue