Class: Docker::RSpec::Run

Inherits:
Object
  • Object
show all
Defined in:
lib/docker/rspec/run.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Run

Returns a new instance of Run.



6
7
8
9
10
11
# File 'lib/docker/rspec/run.rb', line 6

def initialize(options = {})!
  @container = options[:container] || 'rspec'
  @docker_options = options[:docker]
  @rspec_options = options[:rspec]
  run!
end

Instance Method Details

#commandObject



13
14
15
# File 'lib/docker/rspec/run.rb', line 13

def command
  @command ||= "docker-compose #{@docker_options} exec #{@container} rspec #{@rspec_options}"
end

#run!Object



17
18
19
# File 'lib/docker/rspec/run.rb', line 17

def run!
  $stdout.puts exec command
end