mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
make mocking more clearly a one way transform
This commit is contained in:
parent
e3643af5a0
commit
945b86f4a7
2 changed files with 4 additions and 7 deletions
|
@ -6,13 +6,10 @@ $LOAD_PATH.unshift __DIR__ unless
|
|||
|
||||
module Fog
|
||||
|
||||
def self.mocking=(new_mocking)
|
||||
old_mocking = @mocking
|
||||
@mocking = new_mocking
|
||||
unless old_mocking == new_mocking
|
||||
def self.mock!
|
||||
@mocking = true
|
||||
self.reload
|
||||
end
|
||||
end
|
||||
|
||||
def self.mocking?
|
||||
!!@mocking
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'spec'
|
|||
|
||||
current_directory = File.dirname(__FILE__)
|
||||
require "#{current_directory}/../lib/fog"
|
||||
# Fog.mocking = true
|
||||
# Fog.mock!
|
||||
|
||||
def credentials
|
||||
@credentials ||= begin
|
||||
|
|
Loading…
Add table
Reference in a new issue