Sha256: aa6bdad8b1c7e04ef564603104e02e423e7af8731b4611ffd2d7a2215b2671bc
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
shared_examples_for "report" do include_examples 'component' before( :all ) { framework.reports.load name } #before( :each ) { framework.reports.reset } after( :each ) { File.delete( outfile ) rescue nil } def self.test_with_full_report( &block ) it 'should be able to handle a full report' do run( full_report ) instance_eval( &block ) if block_given? end end def self.test_with_empty_report( &block ) it 'should be able to handle an empty report' do run( empty_report ) instance_eval( &block ) if block_given? end end def run( auditstore, opts = {} ) opts['outfile'] ||= outfile #report_name = File.basename( caller.first.split( ':' ).first, '_spec.rb' ) framework.reports.run_one( name, auditstore, opts ) end def full_report Arachni::AuditStore.load( spec_path + 'fixtures/auditstore.afr' ) end def empty_report Arachni::AuditStore.new end def outfile @outfile ||= (0..10).map{ rand( 9 ).to_s }.join end def reports framework.reports end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
arachni-0.4.1.3 | spec/shared/reports.rb |
arachni-0.4.1.2 | spec/shared/reports.rb |
arachni-0.4.1.1 | spec/shared/reports.rb |
arachni-0.4.1 | spec/shared/reports.rb |