Class: RSpec::Httpd::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/httpd/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



7
8
9
10
11
12
# File 'lib/rspec/httpd/config.rb', line 7

def initialize
  self.host = "127.0.0.1"
  self.port = 12_345
  self.command = "bundle exec rackup -E test -p 12345"
  self.logger = Logger.new(STDERR).tap { |logger| logger.level = Logger::INFO }
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



4
5
6
# File 'lib/rspec/httpd/config.rb', line 4

def command
  @command
end

#hostObject

Returns the value of attribute host.



2
3
4
# File 'lib/rspec/httpd/config.rb', line 2

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/rspec/httpd/config.rb', line 5

def logger
  @logger
end

#portObject

Returns the value of attribute port.



3
4
5
# File 'lib/rspec/httpd/config.rb', line 3

def port
  @port
end