metasploit_data_models 0.24.1.pre.rspec.pre.3.pre.1 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +3 -3
  3. data/Gemfile +3 -1
  4. data/app/models/metasploit_data_models/ip_address/v4/segmented.rb +1 -1
  5. data/app/models/metasploit_data_models/search/visitor/where.rb +1 -1
  6. data/app/validators/password_is_strong_validator.rb +1 -1
  7. data/lib/mdm/host/operating_system_normalization.rb +10 -0
  8. data/lib/metasploit_data_models/version.rb +1 -2
  9. data/metasploit_data_models.gemspec +1 -1
  10. data/spec/app/models/mdm/api_key_spec.rb +3 -1
  11. data/spec/app/models/mdm/client_spec.rb +11 -9
  12. data/spec/app/models/mdm/cred_spec.rb +54 -42
  13. data/spec/app/models/mdm/event_spec.rb +23 -21
  14. data/spec/app/models/mdm/exploit_attempt_spec.rb +21 -19
  15. data/spec/app/models/mdm/exploited_host_spec.rb +13 -11
  16. data/spec/app/models/mdm/host_detail_spec.rb +17 -15
  17. data/spec/app/models/mdm/host_spec.rb +260 -261
  18. data/spec/app/models/mdm/host_tag_spec.rb +8 -6
  19. data/spec/app/models/mdm/listener_spec.rb +32 -30
  20. data/spec/app/models/mdm/loot_spec.rb +23 -21
  21. data/spec/app/models/mdm/macro_spec.rb +3 -1
  22. data/spec/app/models/mdm/mod_ref_spec.rb +3 -1
  23. data/spec/app/models/mdm/module/action_spec.rb +12 -10
  24. data/spec/app/models/mdm/module/arch_spec.rb +12 -10
  25. data/spec/app/models/mdm/module/author_spec.rb +17 -22
  26. data/spec/app/models/mdm/module/detail_spec.rb +75 -184
  27. data/spec/app/models/mdm/module/mixin_spec.rb +12 -10
  28. data/spec/app/models/mdm/module/platform_spec.rb +12 -10
  29. data/spec/app/models/mdm/module/ref_spec.rb +12 -10
  30. data/spec/app/models/mdm/module/target_spec.rb +15 -13
  31. data/spec/app/models/mdm/nexpose_console_spec.rb +37 -35
  32. data/spec/app/models/mdm/note_spec.rb +25 -23
  33. data/spec/app/models/mdm/profile_spec.rb +3 -1
  34. data/spec/app/models/mdm/ref_spec.rb +12 -10
  35. data/spec/app/models/mdm/route_spec.rb +8 -6
  36. data/spec/app/models/mdm/service_spec.rb +40 -38
  37. data/spec/app/models/mdm/session_event_spec.rb +12 -10
  38. data/spec/app/models/mdm/session_spec.rb +15 -13
  39. data/spec/app/models/mdm/tag_spec.rb +29 -29
  40. data/spec/app/models/mdm/task_cred_spec.rb +11 -9
  41. data/spec/app/models/mdm/task_host_spec.rb +11 -9
  42. data/spec/app/models/mdm/task_service_spec.rb +11 -9
  43. data/spec/app/models/mdm/task_session_spec.rb +9 -7
  44. data/spec/app/models/mdm/task_spec.rb +29 -27
  45. data/spec/app/models/mdm/user_spec.rb +19 -17
  46. data/spec/app/models/mdm/vuln_attempt_spec.rb +16 -14
  47. data/spec/app/models/mdm/vuln_detail_spec.rb +28 -26
  48. data/spec/app/models/mdm/vuln_ref_spec.rb +10 -8
  49. data/spec/app/models/mdm/vuln_spec.rb +26 -24
  50. data/spec/app/models/mdm/web_form_spec.rb +13 -11
  51. data/spec/app/models/mdm/web_page_spec.rb +21 -19
  52. data/spec/app/models/mdm/web_site_spec.rb +23 -21
  53. data/spec/app/models/mdm/web_vuln_spec.rb +65 -63
  54. data/spec/app/models/mdm/wmap_request_spec.rb +3 -1
  55. data/spec/app/models/mdm/wmap_target_spec.rb +3 -1
  56. data/spec/app/models/mdm/workspace_spec.rb +100 -97
  57. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_result_spec.rb +5 -3
  58. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_set_spec.rb +15 -13
  59. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_spec.rb +3 -1
  60. data/spec/app/models/metasploit_data_models/automatic_exploitation/run_spec.rb +3 -1
  61. data/spec/app/models/metasploit_data_models/ip_address/v4/cidr_spec.rb +12 -10
  62. data/spec/app/models/metasploit_data_models/ip_address/v4/nmap_spec.rb +6 -4
  63. data/spec/app/models/metasploit_data_models/ip_address/v4/range_spec.rb +23 -21
  64. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list_spec.rb +11 -9
  65. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range_spec.rb +23 -21
  66. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/segmented_spec.rb +6 -4
  67. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/single_spec.rb +15 -22
  68. data/spec/app/models/metasploit_data_models/ip_address/v4/single_spec.rb +6 -4
  69. data/spec/app/models/metasploit_data_models/module_run_spec.rb +3 -1
  70. data/spec/app/models/metasploit_data_models/search/operation/ip_address_spec.rb +20 -18
  71. data/spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb +8 -6
  72. data/spec/app/models/metasploit_data_models/search/operation/port/range_spec.rb +10 -8
  73. data/spec/app/models/metasploit_data_models/search/operation/range_spec.rb +10 -8
  74. data/spec/app/models/metasploit_data_models/search/operator/ip_address_spec.rb +4 -2
  75. data/spec/app/models/metasploit_data_models/search/operator/multitext_spec.rb +10 -8
  76. data/spec/app/models/metasploit_data_models/search/operator/port/list_spec.rb +8 -6
  77. data/spec/app/models/metasploit_data_models/search/visitor/attribute_spec.rb +11 -9
  78. data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +7 -5
  79. data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +19 -17
  80. data/spec/app/models/metasploit_data_models/search/visitor/method_spec.rb +7 -5
  81. data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +23 -61
  82. data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +10 -8
  83. data/spec/app/validators/parameters_validator_spec.rb +29 -29
  84. data/spec/app/validators/password_is_strong_validator_spec.rb +46 -54
  85. data/spec/factories/mdm/module/details.rb +1 -1
  86. data/spec/lib/base64_serializer_spec.rb +19 -19
  87. data/spec/lib/metasploit_data_models/ip_address/cidr_spec.rb +12 -18
  88. data/spec/lib/metasploit_data_models/ip_address/range_spec.rb +6 -4
  89. data/spec/lib/metasploit_data_models/match/child_spec.rb +4 -2
  90. data/spec/lib/metasploit_data_models/match/parent_spec.rb +6 -4
  91. data/spec/lib/metasploit_data_models/version_spec.rb +5 -3
  92. data/spec/spec_helper.rb +6 -72
  93. data/spec/support/shared/examples/mdm/module/detail/does_not_support_stance_with_mtype.rb +2 -2
  94. data/spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb +4 -4
  95. data/spec/support/shared/examples/metasploit_data_models/search/operation/ipaddress/match.rb +2 -2
  96. data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_children.rb +5 -5
  97. data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb +5 -5
  98. data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_equality.rb +3 -3
  99. data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_metasploit_model_search_group_base.rb +6 -7
  100. metadata +7 -7
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::AutomaticExploitation::Match, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::AutomaticExploitation::Match do
2
4
  it_should_behave_like 'Metasploit::Concern.run'
3
5
 
4
6
  describe "associations" do
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::AutomaticExploitation::Run, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::AutomaticExploitation::Run do
2
4
  subject(:run) { FactoryGirl.create(:automatic_exploitation_run) }
3
5
 
4
6
 
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::IPAddress::V4::CIDR do
2
4
  subject(:cidr) {
3
5
  described_class.new(
4
6
  value: formatted_value
@@ -9,14 +11,14 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
9
11
  nil
10
12
  }
11
13
 
12
- it { is_expected.to be_a MetasploitDataModels::IPAddress::CIDR }
14
+ it { should be_a MetasploitDataModels::IPAddress::CIDR }
13
15
 
14
16
  context 'address_class' do
15
17
  subject(:address_class) {
16
18
  described_class.address_class
17
19
  }
18
20
 
19
- it { is_expected.to eq(MetasploitDataModels::IPAddress::V4::Single) }
21
+ it { should == MetasploitDataModels::IPAddress::V4::Single }
20
22
  end
21
23
 
22
24
  context 'validations' do
@@ -33,7 +35,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
33
35
  "#{formatted_address}/#{formatted_prefix_length}"
34
36
  }
35
37
 
36
- it { is_expected.to be_valid }
38
+ it { should be_valid }
37
39
  end
38
40
 
39
41
  context 'with IPv4 address' do
@@ -41,7 +43,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
41
43
  formatted_address
42
44
  }
43
45
 
44
- it { is_expected.not_to be_valid }
46
+ it { should_not be_valid }
45
47
 
46
48
  context 'errors' do
47
49
  before(:each) do
@@ -53,7 +55,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
53
55
  cidr.errors[:address]
54
56
  }
55
57
 
56
- it { is_expected.to be_empty }
58
+ it { should be_empty }
57
59
  end
58
60
 
59
61
  context 'on #prefix_length' do
@@ -65,7 +67,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
65
67
  I18n.translate!('errors.messages.not_a_number')
66
68
  }
67
69
 
68
- it { is_expected.to include(blank_error) }
70
+ it { should include(blank_error) }
69
71
  end
70
72
  end
71
73
  end
@@ -83,7 +85,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
83
85
  '48'
84
86
  }
85
87
 
86
- it { is_expected.not_to be_valid }
88
+ it { should_not be_valid }
87
89
 
88
90
  context 'errors' do
89
91
  before(:each) do
@@ -99,7 +101,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
99
101
  I18n.translate!('errors.messages.invalid')
100
102
  }
101
103
 
102
- it { is_expected.to include(invalid_error) }
104
+ it { should include(invalid_error) }
103
105
  end
104
106
 
105
107
  context 'on #prefix_length' do
@@ -111,7 +113,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::CIDR, type: :model do
111
113
  I18n.translate!('errors.messages.less_than_or_equal_to', count: 32)
112
114
  }
113
115
 
114
- it { is_expected.to include(too_big_error) }
116
+ it { should include(too_big_error) }
115
117
  end
116
118
  end
117
119
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::IPAddress::V4::Nmap, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::IPAddress::V4::Nmap do
2
4
  subject(:nmap) {
3
5
  described_class.new(
4
6
  value: formatted_value
@@ -39,7 +41,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Nmap, type: :model do
39
41
  '1.2.3.4'
40
42
  }
41
43
 
42
- it { is_expected.to be_empty }
44
+ it { should be_empty }
43
45
  end
44
46
  end
45
47
 
@@ -55,7 +57,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Nmap, type: :model do
55
57
  )
56
58
  }
57
59
 
58
- it { is_expected.to include length_error }
60
+ it { should include length_error }
59
61
  end
60
62
  end
61
63
  end
@@ -84,7 +86,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Nmap, type: :model do
84
86
  nil
85
87
  }
86
88
 
87
- it { is_expected.to be_nil }
89
+ it { should be_nil }
88
90
  end
89
91
 
90
92
  context 'with matching formatted value' do
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::IPAddress::V4::Range do
2
4
  subject(:range) {
3
5
  described_class.new(
4
6
  value: formatted_value
@@ -45,7 +47,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
45
47
  nil
46
48
  }
47
49
 
48
- it { is_expected.to include presence_error }
50
+ it { should include presence_error }
49
51
  end
50
52
 
51
53
  context 'with MetasploitDataModels::IPAddress::V4::Single' do
@@ -54,7 +56,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
54
56
  '1.1.1.1-256.256.256.256'
55
57
  }
56
58
 
57
- it { is_expected.not_to include invalid_error }
59
+ it { should_not include invalid_error }
58
60
  end
59
61
 
60
62
  context 'without valid' do
@@ -62,7 +64,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
62
64
  '256.256.256.256-257.257.257.257'
63
65
  }
64
66
 
65
- it { is_expected.to include invalid_error }
67
+ it { should include invalid_error }
66
68
  end
67
69
  end
68
70
  end
@@ -79,7 +81,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
79
81
  nil
80
82
  }
81
83
 
82
- it { is_expected.to include presence_error }
84
+ it { should include presence_error }
83
85
  end
84
86
 
85
87
  context 'with MetasploitDataModels::IPAddress::V4::Single' do
@@ -88,7 +90,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
88
90
  '256.256.256.256-1.1.1.1'
89
91
  }
90
92
 
91
- it { is_expected.not_to include invalid_error }
93
+ it { should_not include invalid_error }
92
94
  end
93
95
 
94
96
  context 'without valid' do
@@ -96,7 +98,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
96
98
  '257.257.257.257-256.256.256.256'
97
99
  }
98
100
 
99
- it { is_expected.to include invalid_error }
101
+ it { should include invalid_error }
100
102
  end
101
103
  end
102
104
  end
@@ -120,7 +122,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
120
122
  nil
121
123
  }
122
124
 
123
- it { is_expected.not_to include error }
125
+ it { should_not include error }
124
126
  end
125
127
 
126
128
  context 'with incomparables' do
@@ -128,7 +130,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
128
130
  'a-1'
129
131
  }
130
132
 
131
- it { is_expected.not_to include error }
133
+ it { should_not include error }
132
134
  end
133
135
 
134
136
  context 'with numbers' do
@@ -137,7 +139,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
137
139
  '1.1.1.1-2.2.2.2'
138
140
  }
139
141
 
140
- it { is_expected.not_to include error }
142
+ it { should_not include error }
141
143
  end
142
144
 
143
145
  context 'out of order' do
@@ -145,7 +147,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
145
147
  '2.2.2.2-1.1.1.1'
146
148
  }
147
149
 
148
- it { is_expected.to include error }
150
+ it { should include error }
149
151
  end
150
152
  end
151
153
  end
@@ -204,7 +206,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
204
206
  '1..2'
205
207
  }
206
208
 
207
- it { is_expected.to eq('-') }
209
+ it { should == '-' }
208
210
  end
209
211
  end
210
212
 
@@ -219,14 +221,14 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
219
221
  '1.1.1.1-2.2.2.2'
220
222
  }
221
223
 
222
- it { is_expected.to be_a Range }
224
+ it { should be_a Range }
223
225
 
224
226
  context 'Range#begin' do
225
227
  subject(:range_begin) {
226
228
  value.begin
227
229
  }
228
230
 
229
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Single }
231
+ it { should be_a MetasploitDataModels::IPAddress::V4::Single }
230
232
 
231
233
  it "is value before '-'" do
232
234
  expect(range_begin).to eq(MetasploitDataModels::IPAddress::V4::Single.new(value: '1.1.1.1'))
@@ -238,7 +240,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
238
240
  value.end
239
241
  }
240
242
 
241
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Single }
243
+ it { should be_a MetasploitDataModels::IPAddress::V4::Single }
242
244
 
243
245
  it "is value after '-'" do
244
246
  expect(range_end).to eq(MetasploitDataModels::IPAddress::V4::Single.new(value: '2.2.2.2'))
@@ -251,21 +253,21 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
251
253
  '-'
252
254
  }
253
255
 
254
- it { is_expected.to be_a Range }
256
+ it { should be_a Range }
255
257
 
256
258
  context 'Range#begin' do
257
259
  subject(:range_begin) {
258
260
  value.begin
259
261
  }
260
262
 
261
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Single }
263
+ it { should be_a MetasploitDataModels::IPAddress::V4::Single }
262
264
 
263
265
  context 'MetasploitDataModels::IPAddress::V4::Single#value' do
264
266
  subject(:begin_value) {
265
267
  range_begin.value
266
268
  }
267
269
 
268
- it { is_expected.to eq('') }
270
+ it { should == '' }
269
271
  end
270
272
  end
271
273
 
@@ -274,14 +276,14 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
274
276
  value.end
275
277
  }
276
278
 
277
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Single }
279
+ it { should be_a MetasploitDataModels::IPAddress::V4::Single }
278
280
 
279
281
  context 'MetasploitDataModels::IPAddress::V4::Single#value' do
280
282
  subject(:end_value) {
281
283
  range_end.value
282
284
  }
283
285
 
284
- it { is_expected.to eq('') }
286
+ it { should == '' }
285
287
  end
286
288
  end
287
289
  end
@@ -292,7 +294,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Range, type: :model do
292
294
  '1'
293
295
  end
294
296
 
295
- it { is_expected.not_to be_a Range }
297
+ it { should_not be_a Range }
296
298
  end
297
299
  end
298
300
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List do
2
4
  subject(:nmap) {
3
5
  described_class.new(
4
6
  value: formatted_value
@@ -66,7 +68,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
66
68
  described_class::SEPARATOR
67
69
  }
68
70
 
69
- it { is_expected.to eq(',') }
71
+ it { should == ',' }
70
72
  end
71
73
  end
72
74
 
@@ -89,7 +91,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
89
91
  nil
90
92
  }
91
93
 
92
- it { is_expected.to include blank_error }
94
+ it { should include blank_error }
93
95
  end
94
96
 
95
97
  context 'with matching String' do
@@ -98,7 +100,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
98
100
  '1,2-3'
99
101
  }
100
102
 
101
- it { is_expected.to be_empty }
103
+ it { should be_empty }
102
104
  end
103
105
 
104
106
  context 'with invalid MetasploitDataModels::IPAddress::V4::Nmap::Range' do
@@ -129,7 +131,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
129
131
  'non_matching_string'
130
132
  }
131
133
 
132
- it { is_expected.to include array_error }
134
+ it { should include array_error }
133
135
  end
134
136
  end
135
137
  end
@@ -183,7 +185,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
183
185
  value.first
184
186
  }
185
187
 
186
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
188
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
187
189
 
188
190
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
189
191
  it 'is value from formatted_value' do
@@ -215,7 +217,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
215
217
  value.first
216
218
  }
217
219
 
218
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range }
220
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range }
219
221
 
220
222
  context 'MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range#value' do
221
223
  subject(:element_value) {
@@ -227,7 +229,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
227
229
  element_value.begin
228
230
  }
229
231
 
230
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
232
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
231
233
 
232
234
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
233
235
  it 'is beginning of formatted value' do
@@ -241,7 +243,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::List, type: :
241
243
  element_value.end
242
244
  }
243
245
 
244
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
246
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
245
247
 
246
248
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
247
249
  it 'is beginning of formatted value' do
@@ -1,4 +1,6 @@
1
- RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type: :model do
1
+ require 'spec_helper'
2
+
3
+ describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range do
2
4
  subject(:range) {
3
5
  described_class.new(
4
6
  value: formatted_value
@@ -45,7 +47,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
45
47
  nil
46
48
  }
47
49
 
48
- it { is_expected.to include presence_error }
50
+ it { should include presence_error }
49
51
  end
50
52
 
51
53
  context 'with MetasploitDataModels::IPAddress::V4::Segment' do
@@ -54,7 +56,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
54
56
  '1-256'
55
57
  }
56
58
 
57
- it { is_expected.not_to include invalid_error }
59
+ it { should_not include invalid_error }
58
60
  end
59
61
 
60
62
  context 'without valid' do
@@ -62,7 +64,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
62
64
  '256-257'
63
65
  }
64
66
 
65
- it { is_expected.to include invalid_error }
67
+ it { should include invalid_error }
66
68
  end
67
69
  end
68
70
  end
@@ -79,7 +81,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
79
81
  nil
80
82
  }
81
83
 
82
- it { is_expected.to include presence_error }
84
+ it { should include presence_error }
83
85
  end
84
86
 
85
87
  context 'with MetasploitDataModels::IPAddress::V4::Segment' do
@@ -88,7 +90,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
88
90
  '256-1'
89
91
  }
90
92
 
91
- it { is_expected.not_to include invalid_error }
93
+ it { should_not include invalid_error }
92
94
  end
93
95
 
94
96
  context 'without valid' do
@@ -96,7 +98,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
96
98
  '257-256'
97
99
  }
98
100
 
99
- it { is_expected.to include invalid_error }
101
+ it { should include invalid_error }
100
102
  end
101
103
  end
102
104
  end
@@ -120,7 +122,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
120
122
  nil
121
123
  }
122
124
 
123
- it { is_expected.not_to include error }
125
+ it { should_not include error }
124
126
  end
125
127
 
126
128
  context 'with incomparables' do
@@ -128,7 +130,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
128
130
  'a-1'
129
131
  }
130
132
 
131
- it { is_expected.not_to include error }
133
+ it { should_not include error }
132
134
  end
133
135
 
134
136
  context 'with numbers' do
@@ -137,7 +139,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
137
139
  '1-2'
138
140
  }
139
141
 
140
- it { is_expected.not_to include error }
142
+ it { should_not include error }
141
143
  end
142
144
 
143
145
  context 'out of order' do
@@ -145,7 +147,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
145
147
  '2-1'
146
148
  }
147
149
 
148
- it { is_expected.to include error }
150
+ it { should include error }
149
151
  end
150
152
  end
151
153
  end
@@ -204,7 +206,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
204
206
  '1..2'
205
207
  }
206
208
 
207
- it { is_expected.to eq('-') }
209
+ it { should == '-' }
208
210
  end
209
211
  end
210
212
 
@@ -219,14 +221,14 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
219
221
  '1-2'
220
222
  }
221
223
 
222
- it { is_expected.to be_a Range }
224
+ it { should be_a Range }
223
225
 
224
226
  context 'Range#begin' do
225
227
  subject(:range_begin) {
226
228
  value.begin
227
229
  }
228
230
 
229
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
231
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
230
232
 
231
233
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
232
234
  it "is value before '-'" do
@@ -240,7 +242,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
240
242
  value.end
241
243
  }
242
244
 
243
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
245
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
244
246
 
245
247
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
246
248
  it "is value after '-'" do
@@ -255,21 +257,21 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
255
257
  '-'
256
258
  }
257
259
 
258
- it { is_expected.to be_a Range }
260
+ it { should be_a Range }
259
261
 
260
262
  context 'Range#begin' do
261
263
  subject(:range_begin) {
262
264
  value.begin
263
265
  }
264
266
 
265
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
267
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
266
268
 
267
269
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
268
270
  subject(:begin_value) {
269
271
  range_begin.value
270
272
  }
271
273
 
272
- it { is_expected.to eq('') }
274
+ it { should == '' }
273
275
  end
274
276
  end
275
277
 
@@ -278,14 +280,14 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
278
280
  value.end
279
281
  }
280
282
 
281
- it { is_expected.to be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
283
+ it { should be_a MetasploitDataModels::IPAddress::V4::Segment::Single }
282
284
 
283
285
  context 'MetasploitDataModels::IPAddress::V4::Segment::Single#value' do
284
286
  subject(:end_value) {
285
287
  range_end.value
286
288
  }
287
289
 
288
- it { is_expected.to eq('') }
290
+ it { should == '' }
289
291
  end
290
292
  end
291
293
  end
@@ -296,7 +298,7 @@ RSpec.describe MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range, type:
296
298
  '1'
297
299
  end
298
300
 
299
- it { is_expected.not_to be_a Range }
301
+ it { should_not be_a Range }
300
302
  end
301
303
  end
302
304
  end