Retab all the things (except external/)
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
# -*- coding:binary -*-
|
||||
shared_examples_for 'Msf::Modules::Error subclass #initialize' do
|
||||
context 'instance methods' do
|
||||
context '#initialize' do
|
||||
include_context 'Msf::Modules::Error attributes'
|
||||
context 'instance methods' do
|
||||
context '#initialize' do
|
||||
include_context 'Msf::Modules::Error attributes'
|
||||
|
||||
subject do
|
||||
described_class.new(
|
||||
:module_path => module_path,
|
||||
:module_reference_name => module_reference_name
|
||||
)
|
||||
end
|
||||
subject do
|
||||
described_class.new(
|
||||
:module_path => module_path,
|
||||
:module_reference_name => module_reference_name
|
||||
)
|
||||
end
|
||||
|
||||
it 'should include causal message in error' do
|
||||
subject.to_s.should match(/due to .*/)
|
||||
end
|
||||
it 'should include causal message in error' do
|
||||
subject.to_s.should match(/due to .*/)
|
||||
end
|
||||
|
||||
it 'should set module_path' do
|
||||
subject.module_path.should == module_path
|
||||
end
|
||||
it 'should set module_path' do
|
||||
subject.module_path.should == module_path
|
||||
end
|
||||
|
||||
it 'should set module_reference_name' do
|
||||
subject.module_reference_name.should == module_reference_name
|
||||
end
|
||||
end
|
||||
end
|
||||
it 'should set module_reference_name' do
|
||||
subject.module_reference_name.should == module_reference_name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# -*- 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)
|
||||
unarchived_module_content = ''
|
||||
it 'should be able to read the module content' do
|
||||
archived_module_content = subject.send(:read_module_content, @parent_path, type, module_reference_name)
|
||||
unarchived_module_content = ''
|
||||
|
||||
File.open(unarchived_path) do |f|
|
||||
unarchived_module_content = f.read
|
||||
end
|
||||
File.open(unarchived_path) do |f|
|
||||
unarchived_module_content = f.read
|
||||
end
|
||||
|
||||
unarchived_module_content.should_not be_empty
|
||||
archived_module_content.should == unarchived_module_content
|
||||
end
|
||||
unarchived_module_content.should_not be_empty
|
||||
archived_module_content.should == unarchived_module_content
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
# -*- coding:binary -*-
|
||||
shared_examples_for 'Msf::Modules::VersionCompatibilityError' do
|
||||
let(:error) do
|
||||
begin
|
||||
subject.version_compatible!(module_path, module_reference_name)
|
||||
rescue Msf::Modules::VersionCompatibilityError => error
|
||||
end
|
||||
let(:error) do
|
||||
begin
|
||||
subject.version_compatible!(module_path, module_reference_name)
|
||||
rescue Msf::Modules::VersionCompatibilityError => error
|
||||
end
|
||||
|
||||
error
|
||||
end
|
||||
error
|
||||
end
|
||||
|
||||
it 'should be raised' do
|
||||
expect {
|
||||
subject.version_compatible!(module_path, module_reference_name)
|
||||
}.to raise_error(Msf::Modules::VersionCompatibilityError)
|
||||
end
|
||||
it 'should be raised' do
|
||||
expect {
|
||||
subject.version_compatible!(module_path, module_reference_name)
|
||||
}.to raise_error(Msf::Modules::VersionCompatibilityError)
|
||||
end
|
||||
|
||||
it 'should include minimum API version' do
|
||||
error.to_s.should include(minimum_api_version.to_s)
|
||||
end
|
||||
it 'should include minimum API version' do
|
||||
error.to_s.should include(minimum_api_version.to_s)
|
||||
end
|
||||
|
||||
it 'should include minimum Core version' do
|
||||
error.to_s.should include(minimum_core_version.to_s)
|
||||
end
|
||||
it 'should include minimum Core version' do
|
||||
error.to_s.should include(minimum_core_version.to_s)
|
||||
end
|
||||
|
||||
it 'should include module path' do
|
||||
error.to_s.should include(module_path)
|
||||
end
|
||||
it 'should include module path' do
|
||||
error.to_s.should include(module_path)
|
||||
end
|
||||
|
||||
it 'should include module reference name' do
|
||||
error.to_s.should include(module_reference_name)
|
||||
end
|
||||
it 'should include module reference name' do
|
||||
error.to_s.should include(module_reference_name)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user