bug/bundler_fix
jvazquez-r7 2013-06-07 14:33:33 -05:00
commit 3d86edd3dd
47 changed files with 68 additions and 45 deletions

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
# helps with environment configuration to use for connection to database

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'
@ -228,4 +229,4 @@ describe FastLib do
end
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/data_store'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
#
@ -37,4 +38,4 @@ describe Msf::ModuleManager do
it_should_behave_like 'Msf::ModuleManager::Cache'
it_should_behave_like 'Msf::ModuleManager::Loading'
it_should_behave_like 'Msf::ModuleManager::ModulePaths'
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
describe Msf::Modules::Error do
@ -98,4 +99,4 @@ describe Msf::Modules::Error do
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'
@ -272,4 +273,4 @@ describe Msf::Modules::Loader::Archive do
end
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'
require 'msf/core/modules/loader/directory'

View File

@ -1,7 +1,8 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/modules/metasploit_class_compatibility_error'
describe Msf::Modules::MetasploitClassCompatibilityError do
it_should_behave_like 'Msf::Modules::Error subclass #initialize'
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core'
@ -264,4 +265,4 @@ describe Msf::Modules::Namespace do
end
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
describe Msf::Modules::VersionCompatibilityError do
@ -59,4 +60,4 @@ describe Msf::Modules::VersionCompatibilityError do
end
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'msf/core/option_container'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'msf/core'
require 'msf/core/task_manager'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'msf/core'
require 'msf/base/simple'
@ -97,6 +98,6 @@ describe Msf::Util::EXE do
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
require 'rex/encoding/xor/byte'
require 'spec_helper'

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
require 'rex/encoding/xor/dword'
require 'spec_helper'

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
require 'rex/encoding/xor/qword'
require 'spec_helper'

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
require 'rex/encoding/xor/word'
require 'spec_helper'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/parser/nmap_xml'

View File

@ -1,9 +1,10 @@
# -*- coding:binary -*-
require 'rex/post/meterpreter/packet'
require 'rex/post/meterpreter/packet_parser'
describe Rex::Post::Meterpreter::PacketParser do
subject{
subject(:parser){
Rex::Post::Meterpreter::PacketParser.new
}
before(:each) do
@ -17,41 +18,17 @@ describe Rex::Post::Meterpreter::PacketParser do
end
end
it "should respond to cipher" do
subject.should respond_to :cipher
end
it "should respond to raw" do
subject.should respond_to :raw
end
it "should respond to reset" do
subject.should respond_to :reset
end
it "should respond to recv" do
subject.should respond_to :recv
end
it "should respond to hdr_length_left" do
subject.should respond_to :hdr_length_left
end
it "should respond to payload_length_left" do
subject.should respond_to :payload_length_left
end
it "should initialise with expected defaults" do
subject.send(:raw).should == ""
subject.send(:hdr_length_left).should == 8
subject.send(:payload_length_left).should == 0
parser.send(:raw).should == ""
parser.send(:hdr_length_left).should == 8
parser.send(:payload_length_left).should == 0
end
it "should parse valid raw data into a packet object" do
while @raw.length >0
parsed_packet = subject.recv(@sock)
parsed_packet = parser.recv(@sock)
end
parsed_packet.class.should == Rex::Post::Meterpreter::Packet
parsed_packet.should be_a Rex::Post::Meterpreter::Packet
parsed_packet.type.should == Rex::Post::Meterpreter::PACKET_TYPE_REQUEST
parsed_packet.method?("test_method").should == true
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/post/meterpreter/packet'
describe Rex::Post::Meterpreter::Tlv do

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'rex/proto/http/client_request'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/proto/http/client'
# Note: Some of these tests require a failed

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/socket/range_walker'
describe Rex::Socket::RangeWalker do

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/sslscan/result'
describe Rex::SSLScan::Result do

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rex/sslscan/scanner'
require 'rex/thread_factory'
require 'rex/text'
@ -103,4 +104,4 @@ describe Rex::SSLScan::Scanner do
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'rubygems'
require 'bundler'
Bundler.require(:default, :test, :db)

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'metasploit/framework/database'
shared_context 'DatabaseCleaner' do
@ -33,4 +34,4 @@ shared_context 'DatabaseCleaner' do
DatabaseCleaner.clean_with(:deletion)
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_context 'Msf::Modules::Error attributes' do
let(:causal_message) do
'rspec'
@ -10,4 +11,4 @@ shared_context 'Msf::Modules::Error attributes' do
let(:module_reference_name) do
'module/reference/name'
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_context "Msf::Modules::Loader::Base" do
let(:parent_path) do
parent_pathname.to_s
@ -10,4 +11,4 @@ shared_context "Msf::Modules::Loader::Base" do
let(:root_pathname) do
Pathname.new(Msf::Config.install_root)
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'msf/base/simple/framework'
require 'metasploit/framework'

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
require 'builder'
shared_examples_for 'Msf::DBManager::ImportMsfXml' do

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'Msf::DBManager::ImportMsfXml#check_msf_xml_version! with root tag' do |root_tag, options={}|
options.assert_valid_keys(:allow_yaml)
allow_yaml = options.fetch(:allow_yaml)

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'Msf::DBManager::ImportMsfXml#import_msf_web_element specialization' do
it 'should call #import_msf_web_element with element' do
db_manager.should_receive(:import_msf_web_element).with(element, anything)

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'Msf::Modules::Error subclass #initialize' do
context 'instance methods' do
context '#initialize' do
@ -23,4 +24,4 @@ shared_examples_for 'Msf::Modules::Error subclass #initialize' do
end
end
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'Msf::Modules::Loader::Archive#read_module_content' do
it 'should be able to read the module content' do
archived_module_content = subject.send(:read_module_content, @parent_path, type, module_reference_name)
@ -10,4 +11,4 @@ shared_examples_for 'Msf::Modules::Loader::Archive#read_module_content' do
unarchived_module_content.should_not be_empty
archived_module_content.should == unarchived_module_content
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'Msf::Modules::VersionCompatibilityError' do
let(:error) do
begin
@ -29,4 +30,4 @@ shared_examples_for 'Msf::Modules::VersionCompatibilityError' do
it 'should include module reference name' do
error.to_s.should include(module_reference_name)
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for "an option" do |valid_values, invalid_values|
subject do

View File

@ -1,3 +1,4 @@
# -*- coding:binary -*-
shared_examples_for 'typed_path' do |map|
map ||= {}
if map.length < 1

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
shared_examples_for 'an xor encoder' do |keysize|
it "should encode one block" do