Add the new rspec files

bug/bundler_fix
sinn3r 2013-10-21 20:18:36 -05:00
parent ea56c4914c
commit 135648c171
5 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,16 @@
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::AddonsDetect do
context "Class methods" do
context ".initialize" do
it "should load the Addons Detect javascript" do
js = Rex::Exploitation::Js::AddonsDetect.new.to_s
js.should =~ /window\.addons_detect/
end
end
end
end

View File

@ -0,0 +1,30 @@
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::Memory do
context "Class methods" do
context ".mstime_malloc" do
it "should load the mstime_malloc javascript" do
js = Rex::Exploitation::Js::Memory.mstime_malloc
js.should =~ /function mstime_malloc/
end
end
context ".property_spray" do
it "should load the property_spray javascript" do
js = Rex::Exploitation::Js::Memory.property_spray
js.should =~ /function sprayHeap/
end
end
context ".heap_spray" do
it "should load the heap_spray javascript" do
js = Rex::Exploitation::Js::Memory.heap_spray
js.should =~ /function sprayHeap/
end
end
end
end

View File

@ -0,0 +1,16 @@
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::Network do
context "Class methods" do
context ".ajax_download" do
it "should load the ajax_download javascript" do
js = Rex::Exploitation::Js::Network.ajax_download
js.should =~ /function ajax_download/
end
end
end
end

View File

@ -0,0 +1,16 @@
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::OSDetect do
context "Class methods" do
context ".initialize" do
it "should load the OSDetect javascript" do
js = Rex::Exploitation::Js::OSDetect.new.to_s
js.should =~ /window\.os_detect/
end
end
end
end

View File

@ -0,0 +1,16 @@
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::Utils do
context "Class methods" do
context ".base64" do
it "should load the base64 javascript" do
js = Rex::Exploitation::Js::Utils.base64
js.should =~ /encode : function/
end
end
end
end