From 2b0854dc1b73314023b6e66b3e57b5308abcf235 Mon Sep 17 00:00:00 2001 From: Jonathan Cran Date: Fri, 11 Feb 2011 00:48:06 +0000 Subject: [PATCH] updated to use msf matchers git-svn-id: file:///home/svn/framework3/trunk@11740 4d416f70-5f16-0410-b530-b9f4589650da --- test/functional/meterpreter/meterpreter_java_spec.rb | 1 - test/functional/meterpreter/meterpreter_php_spec.rb | 4 +--- test/functional/meterpreter/meterpreter_spec_helper.rb | 8 +++----- test/functional/meterpreter/meterpreter_win32_spec.rb | 4 +--- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/test/functional/meterpreter/meterpreter_java_spec.rb b/test/functional/meterpreter/meterpreter_java_spec.rb index 2ac45df025..f1604e00c9 100644 --- a/test/functional/meterpreter/meterpreter_java_spec.rb +++ b/test/functional/meterpreter/meterpreter_java_spec.rb @@ -2,7 +2,6 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'test', 'lib')) require 'fileutils' -require 'msftest' require 'msf/base' require 'meterpreter_spec_helper' require 'meterpreter_specs' diff --git a/test/functional/meterpreter/meterpreter_php_spec.rb b/test/functional/meterpreter/meterpreter_php_spec.rb index 04ef8f3ea2..0f38888782 100644 --- a/test/functional/meterpreter/meterpreter_php_spec.rb +++ b/test/functional/meterpreter/meterpreter_php_spec.rb @@ -2,7 +2,6 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'test', 'lib')) require 'fileutils' -require 'msftest' require 'msf/base' require 'meterpreter_spec_helper' require 'meterpreter_specs' @@ -45,8 +44,7 @@ describe "PhpMeterpreter" do end after :all do - #FileUtils.rm_rf("*.jpeg") - #FileUtils.rm_rf(@output_directory) + FileUtils.rm_rf(@output_directory) end diff --git a/test/functional/meterpreter/meterpreter_spec_helper.rb b/test/functional/meterpreter/meterpreter_spec_helper.rb index b321229151..e7f2cc7bc1 100644 --- a/test/functional/meterpreter/meterpreter_spec_helper.rb +++ b/test/functional/meterpreter/meterpreter_spec_helper.rb @@ -32,11 +32,9 @@ module MeterpreterSpecHelper command_output.print_line("meterpreter_functional_test_end") data = hlp_file_to_string(temp_command_file) - ## Ugh, this is ghetto. - x = MsfTestCaseHelper.new(@debug) - x.complete?(data,"meterpreter_functional_test_start","meterpreter_functional_test_end").should be_true - x.all_successes_exist?(data, success_strings).should be_true - x.no_failures_exist?(data, fail_strings, fail_exception_strings ).should be_true + data.should contain_a_complete_test + data.should contain_all_successes + data.should contain_no_failures_except end def hlp_file_to_string(filename) diff --git a/test/functional/meterpreter/meterpreter_win32_spec.rb b/test/functional/meterpreter/meterpreter_win32_spec.rb index 76cdb95dd0..af1c7e9298 100644 --- a/test/functional/meterpreter/meterpreter_win32_spec.rb +++ b/test/functional/meterpreter/meterpreter_win32_spec.rb @@ -2,7 +2,6 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'test', 'lib')) require 'fileutils' -require 'msftest' require 'msf/base' require 'meterpreter_spec_helper' require 'meterpreter_specs' @@ -49,11 +48,10 @@ describe "Win32Meterpreter" do @session.init_ui(@input, @output) ## Clean Up - #FileUtils.rm_rf(@output_directory) + FileUtils.rm_rf(@output_directory) end after :all do - FileUtils.rm_rf("*.jpeg") FileUtils.rm_rf(@output_directory) end