class Cardio::Command::RspecCommand
enhance standard RSpec command with some decko/card -specific options
Public Class Methods
Source
# File lib/cardio/command/rspec_command.rb, line 8 def initialize args require "rspec/core" super() cardio_args, @rspec_args = split_args args @opts = {} Parser.new(@opts).parse!(cardio_args) end
Calls superclass method
Public Instance Methods
Source
# File lib/cardio/command/rspec_command.rb, line 17 def command "#{env_args} #{@opts[:executer]} #{@opts[:rescue]}" \ "rspec #{@rspec_args.shelljoin} #{@opts[:files]}" # .tap { |c| puts c.yellow } end
Private Instance Methods
Source
# File lib/cardio/command/rspec_command.rb, line 29 def coverage if @opts[:simplecov] "CARD_LOAD_STRATEGY=tmp_files" elsif @opts[:files] # explicitly no coverage if rs pec was started with file argument "CARD_SIMPLECOV=false" end end
Source
# File lib/cardio/command/rspec_command.rb, line 25 def env_args ["RAILS_ROOT=.", coverage].compact.join " " end