You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods that rely on the Post-Exploitation API methods (ex: fs_read, etc) can easily be tested by stubbing the methods:
Example:
let(:api){double('Post-Exploitation API Object')}subject{described_class.new(api)}describe"#time"dolet(:unix_timestamp){1642775495}let(:time){Time.at(unix_timestamp)}it"must call the 'sys_time' API function and return a Time object"doexpect(api).toreceive(:sys_time).and_return(unix_timestamp)expect(subject.time).toeq(time)endend
The text was updated successfully, but these errors were encountered:
Add more tests for the various classes:
Ronin::PostEx::System
Ronin::PostEx::System::FS
Ronin::PostEx::System::Process
Ronin::PostEx::System::Shell
Ronin::PostEx::Resource
Ronin::PostEx::File
Ronin::PostEx::File::Stat
Ronin::PostEx::Dir
Ronin::PostEx::Command
Methods that rely on the Post-Exploitation API methods (ex:
fs_read
, etc) can easily be tested by stubbing the methods:Example:
The text was updated successfully, but these errors were encountered: