Class: Kender::Rspec

Inherits:
Command show all
Defined in:
lib/kender/commands/rspec.rb

Instance Method Summary collapse

Methods inherited from Command

all, all_names, commands, #execute, inherited, #name, #run

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/kender/commands/rspec.rb', line 4

def available?
  # do not run if running shamus
  return false if ENV['VALIDATE_PROJECT']
  in_gemfile?("rspec") || in_gemfile?("rspec-rails")
end

#commandObject



10
11
12
13
14
15
16
# File 'lib/kender/commands/rspec.rb', line 10

def command
  if defined?(ParallelTests)
    'bundle exec rake parallel:spec'
  else
    'bundle exec rspec'
  end
end