class Kender::Jasmine
Jasmine
is a unit testing framework for javascript similar to rspec.
Public Instance Methods
available?()
click to toggle source
check whether to actually run this command
# File lib/kender/commands/jasmine.rb, line 6 def available? # do not run if running shamus return false if ENV['VALIDATE_PROJECT'] # make sure those gems were added return false unless in_gemfile?("jasmine") # verify jasmine and phantomjs are both present `phantomjs --version 2>&1 > /dev/null` return false unless $?.success? `bundle exec jasmine license` $?.success? end
command()
click to toggle source
# File lib/kender/commands/jasmine.rb, line 20 def command if in_gemfile?("jasmine-phantom") #This is nicer as will install phantomJS for us. 'bundle exec rake jasmine:phantom:ci' else 'bundle exec rake jasmine:ci' end end