Class: Adva::Tasks::Test::Features

Inherits:
Thor::Group
  • Object
show all
Includes:
Cucumber
Defined in:
lib/adva/tasks/core.rb

Instance Method Summary collapse

Methods included from Cucumber

#cucumber_args, #cucumber_files, #cucumber_options, #cucumber_pattern

Instance Method Details

#featuresObject



135
136
137
138
139
140
141
142
# File 'lib/adva/tasks/core.rb', line 135

def features
  require 'cucumber'
  ENV['REGENERATE_APP'] = 'true' if options['rebuild']
  Rails.env = 'test'

  passed = !::Cucumber::Cli::Main.execute(cucumber_args) # returns true on failure
  exit(passed ? 0 : 1)
end