Class: Decko::Commands::RspecCommand

Inherits:
Command show all
Defined in:
decko/lib/decko/commands/rspec_command.rb,
decko/lib/decko/commands/rspec_command/parser.rb

Defined Under Namespace

Classes: Parser

Instance Method Summary collapse

Methods inherited from Command

#exit_with_child_status, #run, #split_args

Constructor Details

#initialize(args) ⇒ RspecCommand

Returns a new instance of RspecCommand.



6
7
8
9
10
11
12
13
# File 'decko/lib/decko/commands/rspec_command.rb', line 6

def initialize args
  require "rspec/core"
  require "decko/application"

  @decko_args, @rspec_args = split_args args
  @opts = {}
  Parser.new(@opts).parse!(@decko_args)
end

Instance Method Details

#commandObject



15
16
17
18
# File 'decko/lib/decko/commands/rspec_command.rb', line 15

def command
  "#{env_args} #{@opts[:executer]} #{@opts[:rescue]}" \
    "rspec #{@rspec_args.shelljoin} #{@opts[:files]}"
end