Class: CypressOnRails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/cypress_on_rails/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
# File 'lib/cypress_on_rails/configuration.rb', line 9

def initialize
  reset
end

Instance Attribute Details

#cypress_folderObject

Returns the value of attribute cypress_folder.



5
6
7
# File 'lib/cypress_on_rails/configuration.rb', line 5

def cypress_folder
  @cypress_folder
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/cypress_on_rails/configuration.rb', line 7

def logger
  @logger
end

#use_middlewareObject Also known as: use_middleware?

Returns the value of attribute use_middleware.



6
7
8
# File 'lib/cypress_on_rails/configuration.rb', line 6

def use_middleware
  @use_middleware
end

Instance Method Details

#resetObject



15
16
17
18
19
# File 'lib/cypress_on_rails/configuration.rb', line 15

def reset
  self.cypress_folder = 'spec/cypress'
  self.use_middleware = true
  self.logger = Logger.new(STDOUT)
end

#tagged_loggedObject



21
22
23
24
25
26
27
# File 'lib/cypress_on_rails/configuration.rb', line 21

def tagged_logged
  if logger.respond_to?(:tagged)
    logger.tagged('CY_DEV') { yield }
  else
    yield
  end
end