metasploit-model 0.30.0-java → 0.30.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -4
- data/Gemfile +1 -6
- data/lib/metasploit/model/version.rb +1 -1
- data/spec/app/models/metasploit/model/association/reflection_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/group/base_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/group/intersection_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/group/union_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/association_spec.rb +7 -9
- data/spec/app/models/metasploit/model/search/operation/base_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operation/boolean_spec.rb +14 -11
- data/spec/app/models/metasploit/model/search/operation/date_spec.rb +6 -8
- data/spec/app/models/metasploit/model/search/operation/group/base_spec.rb +12 -14
- data/spec/app/models/metasploit/model/search/operation/group/intersection_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/group/union_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/integer_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/null_spec.rb +4 -6
- data/spec/app/models/metasploit/model/search/operation/set/integer_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/set/string_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/set_spec.rb +4 -6
- data/spec/app/models/metasploit/model/search/operation/string_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operator/association_spec.rb +6 -8
- data/spec/app/models/metasploit/model/search/operator/attribute_spec.rb +12 -14
- data/spec/app/models/metasploit/model/search/operator/base_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/delegation_spec.rb +13 -11
- data/spec/app/models/metasploit/model/search/operator/group/base_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operator/group/intersection_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/group/union_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/null_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operator/single_spec.rb +26 -28
- data/spec/app/models/metasploit/model/search/query_spec.rb +48 -50
- data/spec/app/models/metasploit/model/visitation/visitor_spec.rb +7 -9
- data/spec/app/validators/ip_format_validator_spec.rb +7 -9
- data/spec/app/validators/nil_validator_spec.rb +3 -5
- data/spec/app/validators/parameters_validator_spec.rb +29 -29
- data/spec/app/validators/password_is_strong_validator_spec.rb +17 -19
- data/spec/lib/metasploit/model/association/error_spec.rb +1 -3
- data/spec/lib/metasploit/model/association_spec.rb +8 -10
- data/spec/lib/metasploit/model/base_spec.rb +3 -5
- data/spec/lib/metasploit/model/engine_spec.rb +48 -11
- data/spec/lib/metasploit/model/file_spec.rb +3 -5
- data/spec/lib/metasploit/model/invalid_spec.rb +7 -9
- data/spec/lib/metasploit/model/login/status_spec.rb +1 -3
- data/spec/lib/metasploit/model/nilify_blanks_spec.rb +11 -13
- data/spec/lib/metasploit/model/realm/key_spec.rb +15 -17
- data/spec/lib/metasploit/model/search/association/tree_spec.rb +3 -5
- data/spec/lib/metasploit/model/search/association_spec.rb +2 -4
- data/spec/lib/metasploit/model/search/attribute_spec.rb +6 -8
- data/spec/lib/metasploit/model/search/operation/value/integer_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/operation/value/string_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/operation_spec.rb +11 -13
- data/spec/lib/metasploit/model/search/operator/help_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/with_spec.rb +7 -9
- data/spec/lib/metasploit/model/search_spec.rb +11 -13
- data/spec/lib/metasploit/model/spec/error_spec.rb +2 -4
- data/spec/lib/metasploit/model/spec/i18n_exception_handler_spec.rb +5 -7
- data/spec/lib/metasploit/model/spec/pathname_collision_spec.rb +4 -6
- data/spec/lib/metasploit/model/spec_spec.rb +9 -7
- data/spec/lib/metasploit/model/translation_spec.rb +10 -12
- data/spec/lib/metasploit/model/version_spec.rb +3 -5
- data/spec/lib/metasploit/model/visitation/visit_spec.rb +28 -26
- data/spec/matchers/validate_nilness_of_spec.rb +0 -2
- data/spec/spec_helper.rb +69 -7
- data/spec/support/shared/contexts/metasploit/model/search/operator/union/children.rb +1 -1
- data/spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb +8 -8
- data/spec/support/shared/examples/metasploit/model/search/operation/value/string.rb +5 -5
- data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +18 -16
- data/spec/support/shared/examples/metasploit/model/translation.rb +4 -4
- data/spec/support/shared/examples/search/query.rb +3 -3
- data/spec/support/shared/examples/search_association.rb +2 -2
- data/spec/support/shared/examples/search_attribute.rb +3 -3
- data/spec/support/shared/examples/search_with.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11a2997b51e66fb84f748536e612342a3306b6f3
|
4
|
+
data.tar.gz: 08731750d71bc4b661cc30947c963cee82264576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbab2bd870f0468a376afc36634d5da4c3de86b836d1d7ea4fa1d3bc9e841dfe062c90f5c49f3483975263d6dd5710cc16592ba42cbf2ae99f66bd3cf7aa0f1
|
7
|
+
data.tar.gz: 7ffb17ef74e9832b31aede6a6e70a78fd7ffd010d0af8123e887b65e1d3f6df0264de69089456754c4c88f7be58887df5d8cca8171a4c40e34c323f20f9cd977
|
data/.rspec
CHANGED
data/Gemfile
CHANGED
@@ -26,12 +26,7 @@ group :test do
|
|
26
26
|
gem 'coveralls', require: false
|
27
27
|
# Engine tasks are loaded using railtie
|
28
28
|
gem 'railties', *rails_version_constraint
|
29
|
-
gem 'rspec'
|
30
|
-
# need rspec-core >= 2.14.0 because 2.14.0 introduced RSpec::Core::SharedExampleGroup::TopLevel
|
31
|
-
gem 'rspec-core', '>= 2.14.0', '< 3.0.0'
|
32
|
-
# need rspec-rails >= 2.12.0 as 2.12.0 adds support for redefining named subject in nested context that uses the
|
33
|
-
# named subject from the outer context without causing a stack overflow.
|
34
|
-
gem 'rspec-rails', '>= 2.12.0'
|
29
|
+
gem 'rspec-rails', '~> 3.1'
|
35
30
|
# In a full rails project, factory_girl_rails would be in both the :development, and :test group, but since we only
|
36
31
|
# want rails in :test, factory_girl_rails must also only be in :test.
|
37
32
|
# add matchers from shoulda, such as validates_presence_of, which are useful for testing validations
|
@@ -7,7 +7,7 @@ module Metasploit
|
|
7
7
|
# The minor version number, scoped to the {MAJOR} version number.
|
8
8
|
MINOR = 30
|
9
9
|
# The patch number, scoped to the {MAJOR} and {MINOR} version numbers.
|
10
|
-
PATCH =
|
10
|
+
PATCH = 1
|
11
11
|
|
12
12
|
# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the
|
13
13
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Association::Reflection do
|
1
|
+
RSpec.describe Metasploit::Model::Association::Reflection, type: :model do
|
4
2
|
context 'validations' do
|
5
|
-
it {
|
6
|
-
it {
|
7
|
-
it {
|
3
|
+
it { is_expected.to validate_presence_of :model }
|
4
|
+
it { is_expected.to validate_presence_of :name }
|
5
|
+
it { is_expected.to validate_presence_of :class_name }
|
8
6
|
end
|
9
7
|
|
10
8
|
context '#klass' do
|
@@ -42,7 +40,7 @@ describe Metasploit::Model::Association::Reflection do
|
|
42
40
|
end
|
43
41
|
|
44
42
|
it 'should return Class with Class#name #class_name' do
|
45
|
-
klass.
|
43
|
+
expect(klass).to eq(class_name_class)
|
46
44
|
end
|
47
45
|
end
|
48
46
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Group::Base do
|
4
|
-
it { should ensure_length_of(:children).is_at_least(1) }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Group::Base, type: :model do
|
2
|
+
it { is_expected.to ensure_length_of(:children).is_at_least(1) }
|
5
3
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Group::Intersection do
|
4
|
-
it { should be_a Metasploit::Model::Search::Group::Base }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Group::Intersection, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Group::Base }
|
5
3
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Group::Union do
|
4
|
-
it { should be_a Metasploit::Model::Search::Group::Base }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Group::Union, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Group::Base }
|
5
3
|
end
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Association do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Association, type: :model do
|
4
2
|
subject(:operation) {
|
5
3
|
described_class.new(
|
6
4
|
source_operation: source_operation
|
@@ -35,7 +33,7 @@ describe Metasploit::Model::Search::Operation::Association do
|
|
35
33
|
true
|
36
34
|
}
|
37
35
|
|
38
|
-
it {
|
36
|
+
it { is_expected.not_to include(invalid_error) }
|
39
37
|
end
|
40
38
|
|
41
39
|
context 'without valid' do
|
@@ -43,7 +41,7 @@ describe Metasploit::Model::Search::Operation::Association do
|
|
43
41
|
false
|
44
42
|
}
|
45
43
|
|
46
|
-
it {
|
44
|
+
it { is_expected.to include(invalid_error) }
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
@@ -56,12 +54,12 @@ describe Metasploit::Model::Search::Operation::Association do
|
|
56
54
|
nil
|
57
55
|
}
|
58
56
|
|
59
|
-
it {
|
60
|
-
it {
|
57
|
+
it { is_expected.to include(blank_error) }
|
58
|
+
it { is_expected.not_to include(invalid_error) }
|
61
59
|
end
|
62
60
|
end
|
63
61
|
end
|
64
62
|
|
65
|
-
it {
|
66
|
-
it {
|
63
|
+
it { is_expected.not_to respond_to :value }
|
64
|
+
it { is_expected.not_to respond_to :value= }
|
67
65
|
end
|
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Base do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Base, type: :model do
|
4
2
|
subject(:operation) do
|
5
3
|
described_class.new
|
6
4
|
end
|
7
5
|
|
8
6
|
context 'validations' do
|
9
7
|
context 'operator' do
|
10
|
-
it {
|
8
|
+
it { is_expected.to validate_presence_of(:operator) }
|
11
9
|
|
12
10
|
context 'valid' do
|
13
11
|
let(:errors) do
|
@@ -40,7 +38,7 @@ describe Metasploit::Model::Search::Operation::Base do
|
|
40
38
|
end
|
41
39
|
|
42
40
|
it 'should not record error on operator' do
|
43
|
-
errors.
|
41
|
+
expect(errors).not_to include(error)
|
44
42
|
end
|
45
43
|
end
|
46
44
|
|
@@ -50,7 +48,7 @@ describe Metasploit::Model::Search::Operation::Base do
|
|
50
48
|
end
|
51
49
|
|
52
50
|
it 'should record error on operator' do
|
53
|
-
errors.
|
51
|
+
expect(errors).to include(error)
|
54
52
|
end
|
55
53
|
end
|
56
54
|
end
|
@@ -61,7 +59,7 @@ describe Metasploit::Model::Search::Operation::Base do
|
|
61
59
|
end
|
62
60
|
|
63
61
|
it 'should not record error on operator' do
|
64
|
-
errors.
|
62
|
+
expect(errors).not_to include(error)
|
65
63
|
end
|
66
64
|
end
|
67
65
|
end
|
@@ -1,21 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Boolean do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Boolean, type: :model do
|
4
2
|
context 'CONSTANTS' do
|
5
3
|
context 'FORMATTED_VALUE_TO_VALUE' do
|
6
4
|
subject(:formatted_value_to_value) do
|
7
5
|
described_class::FORMATTED_VALUE_TO_VALUE
|
8
6
|
end
|
9
7
|
|
10
|
-
|
11
|
-
|
8
|
+
it "maps 'false' to false" do
|
9
|
+
expect(formatted_value_to_value['false']).to eq(false)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "maps 'true' to true" do
|
13
|
+
expect(formatted_value_to_value['true']).to eq(true)
|
14
|
+
end
|
12
15
|
end
|
13
16
|
end
|
14
17
|
|
15
18
|
context 'validations' do
|
16
|
-
it {
|
17
|
-
it {
|
18
|
-
it {
|
19
|
+
it { is_expected.to allow_value(false).for(:value) }
|
20
|
+
it { is_expected.to allow_value(true).for(:value) }
|
21
|
+
it { is_expected.not_to allow_value(nil).for(:value) }
|
19
22
|
end
|
20
23
|
|
21
24
|
context '#value' do
|
@@ -32,7 +35,7 @@ describe Metasploit::Model::Search::Operation::Boolean do
|
|
32
35
|
'false'
|
33
36
|
end
|
34
37
|
|
35
|
-
it {
|
38
|
+
it { is_expected.to eq(false) }
|
36
39
|
end
|
37
40
|
|
38
41
|
context "with 'true'" do
|
@@ -40,7 +43,7 @@ describe Metasploit::Model::Search::Operation::Boolean do
|
|
40
43
|
'true'
|
41
44
|
end
|
42
45
|
|
43
|
-
it {
|
46
|
+
it { is_expected.to eq(true) }
|
44
47
|
end
|
45
48
|
|
46
49
|
context 'with other' do
|
@@ -49,7 +52,7 @@ describe Metasploit::Model::Search::Operation::Boolean do
|
|
49
52
|
end
|
50
53
|
|
51
54
|
it 'should return value unparsed' do
|
52
|
-
value.
|
55
|
+
expect(value).to eq(formatted_value)
|
53
56
|
end
|
54
57
|
end
|
55
58
|
end
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Date do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Date, type: :model do
|
4
2
|
context 'validation' do
|
5
3
|
context 'value' do
|
6
4
|
before(:each) do
|
@@ -25,7 +23,7 @@ describe Metasploit::Model::Search::Operation::Date do
|
|
25
23
|
end
|
26
24
|
|
27
25
|
it 'should not record error' do
|
28
|
-
errors.
|
26
|
+
expect(errors).not_to include(error)
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
@@ -35,7 +33,7 @@ describe Metasploit::Model::Search::Operation::Date do
|
|
35
33
|
end
|
36
34
|
|
37
35
|
it 'should record error' do
|
38
|
-
errors.
|
36
|
+
expect(errors).to include(error)
|
39
37
|
end
|
40
38
|
end
|
41
39
|
end
|
@@ -56,7 +54,7 @@ describe Metasploit::Model::Search::Operation::Date do
|
|
56
54
|
end
|
57
55
|
|
58
56
|
it 'should be passed in Date' do
|
59
|
-
value.
|
57
|
+
expect(value).to eq(formatted_value)
|
60
58
|
end
|
61
59
|
end
|
62
60
|
|
@@ -71,7 +69,7 @@ describe Metasploit::Model::Search::Operation::Date do
|
|
71
69
|
end
|
72
70
|
|
73
71
|
it 'should be parsed Date' do
|
74
|
-
value.
|
72
|
+
expect(value).to eq(date)
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|
@@ -81,7 +79,7 @@ describe Metasploit::Model::Search::Operation::Date do
|
|
81
79
|
end
|
82
80
|
|
83
81
|
it 'should pass through value' do
|
84
|
-
value.
|
82
|
+
expect(value).to be formatted_value
|
85
83
|
end
|
86
84
|
end
|
87
85
|
end
|
@@ -1,15 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Group::Base do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Group::Base, type: :model do
|
4
2
|
subject(:group) do
|
5
3
|
described_class.new
|
6
4
|
end
|
7
5
|
|
8
|
-
it {
|
6
|
+
it { is_expected.to be_a Metasploit::Model::Search::Operation::Base }
|
9
7
|
|
10
8
|
context 'validations' do
|
11
9
|
context 'children' do
|
12
|
-
it {
|
10
|
+
it { is_expected.to ensure_length_of(:children).is_at_least(1).with_short_message('is too short (minimum is 1 child)') }
|
13
11
|
|
14
12
|
context '#children_valid' do
|
15
13
|
subject(:children_valid) do
|
@@ -48,25 +46,25 @@ describe Metasploit::Model::Search::Operation::Group::Base do
|
|
48
46
|
context 'with all valid' do
|
49
47
|
before(:each) do
|
50
48
|
children.each do |child|
|
51
|
-
child.
|
49
|
+
allow(child).to receive(:valid?).and_return(true)
|
52
50
|
end
|
53
51
|
end
|
54
52
|
|
55
53
|
it 'does not add error on :children' do
|
56
54
|
group.valid?
|
57
55
|
|
58
|
-
group.errors[:children].
|
56
|
+
expect(group.errors[:children]).not_to include(error)
|
59
57
|
end
|
60
58
|
end
|
61
59
|
|
62
60
|
context 'with later valid' do
|
63
61
|
before(:each) do
|
64
|
-
children.first.
|
65
|
-
children.second.
|
62
|
+
allow(children.first).to receive(:valid?).and_return(false)
|
63
|
+
allow(children.second).to receive(:valid?).and_return(true)
|
66
64
|
end
|
67
65
|
|
68
66
|
it 'does not short-circuit and validates all children' do
|
69
|
-
children.second.
|
67
|
+
expect(children.second).to receive(:valid?).and_return(true)
|
70
68
|
|
71
69
|
children_valid
|
72
70
|
end
|
@@ -74,7 +72,7 @@ describe Metasploit::Model::Search::Operation::Group::Base do
|
|
74
72
|
it 'should add error on :children' do
|
75
73
|
group.valid?
|
76
74
|
|
77
|
-
group.errors[:children].
|
75
|
+
expect(group.errors[:children]).to include(error)
|
78
76
|
end
|
79
77
|
end
|
80
78
|
end
|
@@ -87,7 +85,7 @@ describe Metasploit::Model::Search::Operation::Group::Base do
|
|
87
85
|
it 'does not add error on :children' do
|
88
86
|
group.valid?
|
89
87
|
|
90
|
-
group.errors[:children].
|
88
|
+
expect(group.errors[:children]).not_to include(error)
|
91
89
|
end
|
92
90
|
end
|
93
91
|
end
|
@@ -100,7 +98,7 @@ describe Metasploit::Model::Search::Operation::Group::Base do
|
|
100
98
|
end
|
101
99
|
|
102
100
|
context 'default' do
|
103
|
-
it {
|
101
|
+
it { is_expected.to eq([]) }
|
104
102
|
end
|
105
103
|
|
106
104
|
context 'with attribute' do
|
@@ -117,7 +115,7 @@ describe Metasploit::Model::Search::Operation::Group::Base do
|
|
117
115
|
end
|
118
116
|
|
119
117
|
it 'is the value passed with :children to #new' do
|
120
|
-
children.
|
118
|
+
expect(children).to eq(expected_children)
|
121
119
|
end
|
122
120
|
end
|
123
121
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Group::Intersection do
|
4
|
-
it { should be_a Metasploit::Model::Search::Operation::Group::Base }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Group::Intersection, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Operation::Group::Base }
|
5
3
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Group::Union do
|
4
|
-
it { should be_a Metasploit::Model::Search::Operation::Group::Base }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Group::Union, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Operation::Group::Base }
|
5
3
|
end
|
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Integer do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Integer, type: :model do
|
4
2
|
context 'validation' do
|
5
|
-
it {
|
3
|
+
it { is_expected.to validate_numericality_of(:value).only_integer }
|
6
4
|
end
|
7
5
|
|
8
6
|
it_should_behave_like 'Metasploit::Model::Search::Operation::Value::Integer'
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Null do
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Null, type: :model do
|
4
2
|
context 'validation' do
|
5
3
|
context 'operator' do
|
6
4
|
context 'null' do
|
@@ -41,7 +39,7 @@ describe Metasploit::Model::Search::Operation::Null do
|
|
41
39
|
end
|
42
40
|
|
43
41
|
it 'should not record error' do
|
44
|
-
errors.
|
42
|
+
expect(errors).not_to include(error)
|
45
43
|
end
|
46
44
|
end
|
47
45
|
|
@@ -51,11 +49,11 @@ describe Metasploit::Model::Search::Operation::Null do
|
|
51
49
|
end
|
52
50
|
|
53
51
|
it 'should record error' do
|
54
|
-
errors.
|
52
|
+
expect(errors).to include(error)
|
55
53
|
end
|
56
54
|
|
57
55
|
it 'should have no other errors, so that it would be valid without this type check on operator' do
|
58
|
-
operation.errors.size.
|
56
|
+
expect(operation.errors.size).to eq(1)
|
59
57
|
end
|
60
58
|
end
|
61
59
|
end
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Set::Integer do
|
4
|
-
it { should be_a Metasploit::Model::Search::Operation::Set }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Set::Integer, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Operation::Set }
|
5
3
|
|
6
4
|
it_should_behave_like 'Metasploit::Model::Search::Operation::Value::Integer'
|
7
5
|
end
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe Metasploit::Model::Search::Operation::Set::String do
|
4
|
-
it { should be_a Metasploit::Model::Search::Operation::Set }
|
1
|
+
RSpec.describe Metasploit::Model::Search::Operation::Set::String, type: :model do
|
2
|
+
it { is_expected.to be_a Metasploit::Model::Search::Operation::Set }
|
5
3
|
|
6
4
|
it_should_behave_like 'Metasploit::Model::Search::Operation::Value::String'
|
7
5
|
end
|