Class: Wagn::Commands::RspecCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/wagn/commands/rspec_command.rb,
lib/wagn/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 'lib/wagn/commands/rspec_command.rb', line 6

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

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

Instance Method Details

#commandObject



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

def command
  "#{env_args} #{@opts[:executer]} " \
    " #{@opts[:rescue]} rspec #{@rspec_args.shelljoin} #{@opts[:files]} "\
    " --exclude-pattern \"./card/vendor/**/*\""
end