File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ RSpec . describe Msf ::ModuleSet do
4
+ subject ( :module_set ) {
5
+ described_class . new ( module_type )
6
+ }
7
+
8
+ let ( :module_type ) {
9
+ FactoryGirl . generate :mdm_module_detail_mtype
10
+ }
11
+
12
+ context '#rank_modules' do
13
+ subject ( :rank_modules ) {
14
+ module_set . send ( :rank_modules )
15
+ }
16
+
17
+ context 'with Msf::SymbolicModule' do
18
+ before ( :each ) do
19
+ module_set [ 'a' ] = Msf ::SymbolicModule
20
+ module_set [ 'b' ] = Msf ::SymbolicModule
21
+ module_set [ 'c' ] = Msf ::SymbolicModule
22
+ end
23
+
24
+ context 'create' do
25
+ context 'returns nil' do
26
+ before ( :each ) do
27
+ allow ( module_set ) . to receive ( :create ) . and_return ( nil )
28
+ end
29
+
30
+ specify {
31
+ expect {
32
+ rank_modules
33
+ } . not_to raise_error
34
+ }
35
+ end
36
+
37
+ context 'does not return nil' do
38
+ context 'with Rank' do
39
+ it 'is ranked using Rank'
40
+ end
41
+
42
+ context 'without Rank' do
43
+ it 'is ranked as Normal'
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ context 'without Msf::SymbolicModule' do
50
+ context 'with Rank' do
51
+ it 'is ranked using Rank'
52
+ end
53
+
54
+ context 'without Rank' do
55
+ it 'is ranked as Normal'
56
+ end
57
+ end
58
+ end
59
+ end
You can’t perform that action at this time.
0 commit comments