File tree Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change 111
111
end
112
112
113
113
context 'without Msf::SymbolicModule' do
114
+ #
115
+ # lets
116
+ #
117
+
118
+ let ( :a_class ) {
119
+ Class . new
120
+ }
121
+
122
+ let ( :b_class ) {
123
+ Class . new
124
+ }
125
+
126
+ let ( :c_class ) {
127
+ Class . new
128
+ }
129
+
130
+ #
131
+ # Callbacks
132
+ #
133
+
134
+ before ( :each ) do
135
+ module_set [ 'a' ] = a_class
136
+ module_set [ 'b' ] = b_class
137
+ module_set [ 'c' ] = c_class
138
+ end
139
+
114
140
context 'with Rank' do
115
- it 'is ranked using Rank'
141
+ before ( :each ) do
142
+ stub_const ( 'A' , a_class )
143
+ stub_const ( 'A::Rank' , Msf ::LowRanking )
144
+
145
+ stub_const ( 'B' , b_class )
146
+ stub_const ( 'B::Rank' , Msf ::AverageRanking )
147
+
148
+ stub_const ( 'C' , c_class )
149
+ stub_const ( 'C::Rank' , Msf ::GoodRanking )
150
+ end
151
+
152
+ it 'is ranked using Rank' do
153
+ expect ( rank_modules ) . to eq (
154
+ [
155
+ [ 'c' , c_class ] ,
156
+ [ 'b' , b_class ] ,
157
+ [ 'a' , a_class ]
158
+ ]
159
+ )
160
+ end
116
161
end
117
162
118
163
context 'without Rank' do
You can’t perform that action at this time.
0 commit comments