1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-08-28 23:26:18 +02:00

updating how cucumber loads features

starting to use a cucumber.yml to store the profile configs
we will not be running @targets by default
This commit is contained in:
darkbushido 2014-08-19 15:05:47 -05:00
parent fd9e92bb24
commit 8f3f37dd54
No known key found for this signature in database
GPG Key ID: 3922EB70FB80E8DD
5 changed files with 29 additions and 15 deletions

View File

@ -9,14 +9,3 @@ require 'metasploit/framework/require'
Metasploit::Framework::Require.optionally_active_record_railtie
Metasploit::Framework::Application.load_tasks
begin
require 'cucumber'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = 'features --format pretty'
end
rescue LoadError
puts "cucumber not in bundle, so can't set up feature tasks. " \
"To run features ensure to install the development and test groups."
end

6
config/cucumber.yml Normal file
View File

@ -0,0 +1,6 @@
# config/cucumber.yml
##YAML Template
---
<% common = "--tags ~@wip --strict --tags ~@targets" %>
default: <%= common %> features
boot: <%= common %> --format html --out=features_report.html features

View File

@ -1,11 +1,10 @@
require 'aruba/cucumber'
paths = [
File.expand_path(File.join(File.dirname(__FILE__))),
File.expand_path(File.join(File.dirname(__FILE__), %w(.. ..))),
ENV['PATH']
]
ENV['PATH'] = paths.join(File::PATH_SEPARATOR)
#"#{File.expand_path(File.join(File.dirname(__FILE__)))}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
Before do
@aruba_timeout_seconds = 60
@aruba_timeout_seconds = 60
end

View File

@ -6,6 +6,6 @@ Before('@msfconsole') do
# -- --=[ 0 payloads - 0 encoders - 0 nops ]
end
Before('@target') do
Before('@targets') do
step 'targets are loaded'
end

20
lib/tasks/cucumber.rake Normal file
View File

@ -0,0 +1,20 @@
begin
require 'cucumber'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = 'features --format pretty'
t.profile = 'default'
end
namespace :features do
Cucumber::Rake::Task.new(:boot) do |t|
t.profile = 'startup'
end
end
rescue LoadError
puts "cucumber not in bundle, so can't set up feature tasks. " \
"To run features ensure to install the development and test groups."
end