metasploit-model 0.30.2 → 1.0.0.pre.rails.pre.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +4 -2
  3. data/CONTRIBUTING.md +49 -9
  4. data/Gemfile +8 -3
  5. data/lib/metasploit/model.rb +5 -0
  6. data/lib/metasploit/model/engine.rb +1 -1
  7. data/lib/metasploit/model/version.rb +14 -26
  8. data/metasploit-model.gemspec +5 -3
  9. data/spec/app/models/metasploit/model/association/reflection_spec.rb +7 -5
  10. data/spec/app/models/metasploit/model/search/group/base_spec.rb +4 -2
  11. data/spec/app/models/metasploit/model/search/group/intersection_spec.rb +4 -2
  12. data/spec/app/models/metasploit/model/search/group/union_spec.rb +4 -2
  13. data/spec/app/models/metasploit/model/search/operation/association_spec.rb +9 -7
  14. data/spec/app/models/metasploit/model/search/operation/base_spec.rb +7 -5
  15. data/spec/app/models/metasploit/model/search/operation/boolean_spec.rb +11 -14
  16. data/spec/app/models/metasploit/model/search/operation/date_spec.rb +8 -6
  17. data/spec/app/models/metasploit/model/search/operation/group/base_spec.rb +14 -12
  18. data/spec/app/models/metasploit/model/search/operation/group/intersection_spec.rb +4 -2
  19. data/spec/app/models/metasploit/model/search/operation/group/union_spec.rb +4 -2
  20. data/spec/app/models/metasploit/model/search/operation/integer_spec.rb +4 -2
  21. data/spec/app/models/metasploit/model/search/operation/null_spec.rb +6 -4
  22. data/spec/app/models/metasploit/model/search/operation/set/integer_spec.rb +4 -2
  23. data/spec/app/models/metasploit/model/search/operation/set/string_spec.rb +4 -2
  24. data/spec/app/models/metasploit/model/search/operation/set_spec.rb +6 -4
  25. data/spec/app/models/metasploit/model/search/operation/string_spec.rb +4 -2
  26. data/spec/app/models/metasploit/model/search/operator/association_spec.rb +8 -6
  27. data/spec/app/models/metasploit/model/search/operator/attribute_spec.rb +14 -12
  28. data/spec/app/models/metasploit/model/search/operator/base_spec.rb +5 -3
  29. data/spec/app/models/metasploit/model/search/operator/delegation_spec.rb +11 -13
  30. data/spec/app/models/metasploit/model/search/operator/group/base_spec.rb +7 -5
  31. data/spec/app/models/metasploit/model/search/operator/group/intersection_spec.rb +5 -3
  32. data/spec/app/models/metasploit/model/search/operator/group/union_spec.rb +5 -3
  33. data/spec/app/models/metasploit/model/search/operator/null_spec.rb +7 -5
  34. data/spec/app/models/metasploit/model/search/operator/single_spec.rb +28 -26
  35. data/spec/app/models/metasploit/model/search/query_spec.rb +50 -48
  36. data/spec/app/models/metasploit/model/visitation/visitor_spec.rb +9 -7
  37. data/spec/app/validators/ip_format_validator_spec.rb +9 -7
  38. data/spec/app/validators/nil_validator_spec.rb +5 -3
  39. data/spec/app/validators/parameters_validator_spec.rb +29 -29
  40. data/spec/app/validators/password_is_strong_validator_spec.rb +19 -17
  41. data/spec/dummy/config/application.rb +3 -1
  42. data/spec/dummy/config/environments/development.rb +0 -3
  43. data/spec/lib/metasploit/model/association/error_spec.rb +3 -1
  44. data/spec/lib/metasploit/model/association_spec.rb +10 -8
  45. data/spec/lib/metasploit/model/base_spec.rb +5 -3
  46. data/spec/lib/metasploit/model/engine_spec.rb +11 -48
  47. data/spec/lib/metasploit/model/file_spec.rb +5 -3
  48. data/spec/lib/metasploit/model/invalid_spec.rb +9 -7
  49. data/spec/lib/metasploit/model/login/status_spec.rb +3 -1
  50. data/spec/lib/metasploit/model/nilify_blanks_spec.rb +13 -11
  51. data/spec/lib/metasploit/model/realm/key_spec.rb +17 -15
  52. data/spec/lib/metasploit/model/search/association/tree_spec.rb +5 -3
  53. data/spec/lib/metasploit/model/search/association_spec.rb +4 -2
  54. data/spec/lib/metasploit/model/search/attribute_spec.rb +8 -6
  55. data/spec/lib/metasploit/model/search/operation/value/integer_spec.rb +3 -1
  56. data/spec/lib/metasploit/model/search/operation/value/string_spec.rb +3 -1
  57. data/spec/lib/metasploit/model/search/operation_spec.rb +13 -11
  58. data/spec/lib/metasploit/model/search/operator/help_spec.rb +3 -1
  59. data/spec/lib/metasploit/model/search/with_spec.rb +9 -7
  60. data/spec/lib/metasploit/model/search_spec.rb +13 -11
  61. data/spec/lib/metasploit/model/spec/error_spec.rb +4 -2
  62. data/spec/lib/metasploit/model/spec/i18n_exception_handler_spec.rb +7 -5
  63. data/spec/lib/metasploit/model/spec/pathname_collision_spec.rb +6 -4
  64. data/spec/lib/metasploit/model/spec_spec.rb +7 -9
  65. data/spec/lib/metasploit/model/translation_spec.rb +12 -10
  66. data/spec/lib/metasploit/model/version_spec.rb +139 -3
  67. data/spec/lib/metasploit/model/visitation/visit_spec.rb +26 -28
  68. data/spec/matchers/validate_nilness_of_spec.rb +2 -0
  69. data/spec/spec_helper.rb +10 -80
  70. data/spec/support/shared/contexts/metasploit/model/search/operator/union/children.rb +1 -1
  71. data/spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb +8 -8
  72. data/spec/support/shared/examples/metasploit/model/search/operation/value/string.rb +5 -5
  73. data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +16 -18
  74. data/spec/support/shared/examples/metasploit/model/translation.rb +4 -4
  75. data/spec/support/shared/examples/search/query.rb +3 -3
  76. data/spec/support/shared/examples/search_association.rb +2 -2
  77. data/spec/support/shared/examples/search_attribute.rb +3 -3
  78. data/spec/support/shared/examples/search_with.rb +3 -3
  79. metadata +20 -27
  80. data/CHANGELOG.md +0 -6
  81. data/RELEASING.md +0 -86
  82. data/UPGRADING.md +0 -1
  83. data/spec/lib/metasploit/model_spec.rb +0 -4
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Association::Tree do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Association::Tree do
2
4
  context 'expand' do
3
5
  subject(:expand) {
4
6
  described_class.expand(associations)
@@ -97,7 +99,7 @@ RSpec.describe Metasploit::Model::Association::Tree do
97
99
  nil
98
100
  }
99
101
 
100
- it { is_expected.to be_nil }
102
+ it { should be_nil }
101
103
  end
102
104
 
103
105
  context 'without nil' do
@@ -309,7 +311,7 @@ RSpec.describe Metasploit::Model::Association::Tree do
309
311
  nil
310
312
  }
311
313
 
312
- it { is_expected.to eq([]) }
314
+ it { should == [] }
313
315
  end
314
316
  end
315
317
 
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Association do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Association do
2
4
  subject(:base_class) do
3
5
  described_class = self.described_class
4
6
 
@@ -54,7 +56,7 @@ RSpec.describe Metasploit::Model::Search::Association do
54
56
 
55
57
  context 'search_associations' do
56
58
  subject(:search_associations) {
57
- base_class.search_associations(*associations)
59
+ base_class.search_associations *associations
58
60
  }
59
61
 
60
62
  let(:associations) {
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Attribute do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Attribute do
2
4
  subject(:base_class) do
3
5
  described_class = self.described_class
4
6
 
@@ -24,7 +26,7 @@ RSpec.describe Metasploit::Model::Search::Attribute do
24
26
  end
25
27
 
26
28
  it 'should call search_with' do
27
- expect(base_class).to receive(:search_with).with(
29
+ base_class.should_receive(:search_with).with(
28
30
  Metasploit::Model::Search::Operator::Attribute,
29
31
  hash_including(
30
32
  :attribute => attribute,
@@ -38,7 +40,7 @@ RSpec.describe Metasploit::Model::Search::Attribute do
38
40
  it 'should be in search_attribute_operator_by_attribute' do
39
41
  # grab operator first since it calls search_attribute and populates search_attribute_operator_by_attribute
40
42
  cached = operator
41
- expect(base_class.search_with_operator_by_name[attribute]).to eq(cached)
43
+ base_class.search_with_operator_by_name[attribute].should == cached
42
44
  end
43
45
 
44
46
  context 'attribute' do
@@ -47,7 +49,7 @@ RSpec.describe Metasploit::Model::Search::Attribute do
47
49
  end
48
50
 
49
51
  it 'should be the attribute passed to search_attribute' do
50
- expect(operator_attribute).to eq(attribute)
52
+ operator_attribute.should == attribute
51
53
  end
52
54
  end
53
55
 
@@ -57,7 +59,7 @@ RSpec.describe Metasploit::Model::Search::Attribute do
57
59
  end
58
60
 
59
61
  it 'should be class on which search_attribute was called' do
60
- expect(klass).to eq(base_class)
62
+ klass.should == base_class
61
63
  end
62
64
  end
63
65
 
@@ -67,7 +69,7 @@ RSpec.describe Metasploit::Model::Search::Attribute do
67
69
  end
68
70
 
69
71
  it 'should be type passed to search_attribute' do
70
- expect(operator_type).to eq(type)
72
+ operator_type.should == type
71
73
  end
72
74
  end
73
75
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Operation::Value::Integer do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Operation::Value::Integer do
2
4
  it_should_behave_like 'Metasploit::Model::Search::Operation::Value::Integer' do
3
5
  let(:operation_class) do
4
6
  described_class = self.described_class
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Operation::Value::String do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Operation::Value::String do
2
4
  it_should_behave_like 'Metasploit::Model::Search::Operation::Value::String' do
3
5
  let(:operation_class) do
4
6
  described_class = self.described_class
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Operation do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Operation do
2
4
  context 'parse' do
3
5
  subject(:parse) do
4
6
  described_class.parse(options)
@@ -46,8 +48,8 @@ RSpec.describe Metasploit::Model::Search::Operation do
46
48
 
47
49
  context "with at least one ':' in :formatted_operation" do
48
50
  before(:each) do
49
- allow(query).to receive(:parse_operator).with(formatted_operator).and_return(operator)
50
- allow(operator).to receive(:operate_on).with(formatted_value).and_return(operation)
51
+ query.stub(:parse_operator).with(formatted_operator).and_return(operator)
52
+ operator.stub(:operate_on).with(formatted_value).and_return(operation)
51
53
  end
52
54
 
53
55
  context "with multiple ':' in :formatted_operation" do
@@ -56,13 +58,13 @@ RSpec.describe Metasploit::Model::Search::Operation do
56
58
  end
57
59
 
58
60
  it "should treat portion before first ':' as formatted operator" do
59
- expect(query).to receive(:parse_operator).with(formatted_operator)
61
+ query.should_receive(:parse_operator).with(formatted_operator)
60
62
 
61
63
  parse
62
64
  end
63
65
 
64
66
  it "should treat portion after first ':' as formatted value including later ':'" do
65
- expect(operator).to receive(:operate_on).with(formatted_value)
67
+ operator.should_receive(:operate_on).with(formatted_value)
66
68
 
67
69
  parse
68
70
  end
@@ -74,13 +76,13 @@ RSpec.describe Metasploit::Model::Search::Operation do
74
76
  end
75
77
 
76
78
  it "should use portion before ':' as formatted operator" do
77
- expect(query).to receive(:parse_operator).with(formatted_operator)
79
+ query.should_receive(:parse_operator).with(formatted_operator)
78
80
 
79
81
  parse
80
82
  end
81
83
 
82
84
  it "should use portion after ':' as formatted value" do
83
- expect(operator).to receive(:operate_on).with(formatted_value)
85
+ operator.should_receive(:operate_on).with(formatted_value)
84
86
 
85
87
  parse
86
88
  end
@@ -101,17 +103,17 @@ RSpec.describe Metasploit::Model::Search::Operation do
101
103
  end
102
104
 
103
105
  it "should use entirety as formatted operator" do
104
- allow(operator).to receive(:operate_on).and_return(operation)
106
+ operator.stub(:operate_on).and_return(operation)
105
107
 
106
- expect(query).to receive(:parse_operator).with(formatted_operator).and_return(operator)
108
+ query.should_receive(:parse_operator).with(formatted_operator).and_return(operator)
107
109
 
108
110
  parse
109
111
  end
110
112
 
111
113
  it "should use '' as formatted value instead of nil" do
112
- allow(query).to receive(:parse_operator).and_return(operator)
114
+ query.stub(:parse_operator).and_return(operator)
113
115
 
114
- expect(operator).to receive(:operate_on).with('')
116
+ operator.should_receive(:operate_on).with('')
115
117
 
116
118
  parse
117
119
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::Operator::Help do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::Operator::Help do
2
4
  it_should_behave_like 'Metasploit::Model::Search::Operator::Help' do
3
5
  let(:operator) do
4
6
  operator_class.new(
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search::With do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search::With do
2
4
  let(:base_class) do
3
5
  described_class = self.described_class
4
6
 
@@ -35,7 +37,7 @@ RSpec.describe Metasploit::Model::Search::With do
35
37
  end
36
38
 
37
39
  it 'should pass given options to operator_class.new' do
38
- expect(operator_class).to receive(:new).with(
40
+ operator_class.should_receive(:new).with(
39
41
  hash_including(options)
40
42
  ).and_return(operator)
41
43
 
@@ -43,7 +45,7 @@ RSpec.describe Metasploit::Model::Search::With do
43
45
  end
44
46
 
45
47
  it 'should merge :klass into options passed to operator.new' do
46
- expect(operator_class).to receive(:new).with(
48
+ operator_class.should_receive(:new).with(
47
49
  hash_including(
48
50
  :klass => base_class
49
51
  )
@@ -53,9 +55,9 @@ RSpec.describe Metasploit::Model::Search::With do
53
55
  end
54
56
 
55
57
  it 'should validate operator' do
56
- allow(operator_class).to receive(:new).and_return(operator)
58
+ operator_class.stub(:new).and_return(operator)
57
59
 
58
- expect(operator).to receive(:valid!)
60
+ operator.should_receive(:valid!)
59
61
 
60
62
  search_with_operator
61
63
  end
@@ -63,7 +65,7 @@ RSpec.describe Metasploit::Model::Search::With do
63
65
  it 'should add operator to search_with_operator_by_name' do
64
66
  search_with_operator
65
67
 
66
- expect(base_class.search_with_operator_by_name[operator.name]).to eq(operator)
68
+ base_class.search_with_operator_by_name[operator.name].should == operator
67
69
  end
68
70
  end
69
71
 
@@ -73,7 +75,7 @@ RSpec.describe Metasploit::Model::Search::With do
73
75
  end
74
76
 
75
77
  it 'should default to empty Hash' do
76
- expect(search_with_operator_by_name).to eq({})
78
+ search_with_operator_by_name.should == {}
77
79
  end
78
80
  end
79
81
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Search do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Search do
2
4
  subject(:base_instance) do
3
5
  base_class.new
4
6
  end
@@ -14,9 +16,9 @@ RSpec.describe Metasploit::Model::Search do
14
16
  base_class.send(:include, described_class)
15
17
  end
16
18
 
17
- it { is_expected.to be_a Metasploit::Model::Search::Association }
18
- it { is_expected.to be_a Metasploit::Model::Search::Attribute }
19
- it { is_expected.to be_a Metasploit::Model::Search::With }
19
+ it { should be_a Metasploit::Model::Search::Association }
20
+ it { should be_a Metasploit::Model::Search::Attribute }
21
+ it { should be_a Metasploit::Model::Search::With }
20
22
 
21
23
  context 'search_operator_by_name' do
22
24
  subject(:search_operator_by_name) do
@@ -43,7 +45,7 @@ RSpec.describe Metasploit::Model::Search do
43
45
  end
44
46
 
45
47
  it 'should be same as the attribute' do
46
- expect(name).to eq(attribute)
48
+ name.should == attribute
47
49
  end
48
50
  end
49
51
  end
@@ -88,7 +90,7 @@ RSpec.describe Metasploit::Model::Search do
88
90
  "#{association}.#{associated_attribute}".to_sym
89
91
  end
90
92
 
91
- it { is_expected.to be_a Metasploit::Model::Search::Operator::Association }
93
+ it { should be_a Metasploit::Model::Search::Operator::Association }
92
94
 
93
95
  context 'association' do
94
96
  subject(:operator_association) do
@@ -96,7 +98,7 @@ RSpec.describe Metasploit::Model::Search do
96
98
  end
97
99
 
98
100
  it 'should be the registered association' do
99
- expect(operator_association).to eq(association)
101
+ operator_association.should == association
100
102
  end
101
103
  end
102
104
 
@@ -110,7 +112,7 @@ RSpec.describe Metasploit::Model::Search do
110
112
  end
111
113
 
112
114
  it 'should be operator from associated class' do
113
- expect(source_operator).to eq(direct_attribute_operator)
115
+ source_operator.should == direct_attribute_operator
114
116
  end
115
117
  end
116
118
 
@@ -120,7 +122,7 @@ RSpec.describe Metasploit::Model::Search do
120
122
  end
121
123
 
122
124
  it 'should be class that called search_operator_by_name' do
123
- expect(klass).to eq(base_class)
125
+ klass.should == base_class
124
126
  end
125
127
  end
126
128
  end
@@ -153,7 +155,7 @@ RSpec.describe Metasploit::Model::Search do
153
155
  end
154
156
 
155
157
  it 'should be in search_operator_by_name' do
156
- expect(named_operator).to eq(operator)
158
+ named_operator.should == operator
157
159
  end
158
160
  end
159
161
  end
@@ -161,7 +163,7 @@ RSpec.describe Metasploit::Model::Search do
161
163
  context 'without search attribute' do
162
164
  context 'without search association' do
163
165
  context 'without search with' do
164
- it { is_expected.to be_empty }
166
+ it { should be_empty }
165
167
  end
166
168
  end
167
169
  end
@@ -1,3 +1,5 @@
1
- RSpec.describe Metasploit::Model::Spec::Error do
2
- it { is_expected.to be_a StandardError }
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Spec::Error do
4
+ it { should be_a StandardError }
3
5
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Spec::I18nExceptionHandler do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Spec::I18nExceptionHandler do
2
4
  subject(:i18n_exception_handler) do
3
5
  described_class.new
4
6
  end
@@ -30,10 +32,10 @@ RSpec.describe Metasploit::Model::Spec::I18nExceptionHandler do
30
32
  expect {
31
33
  call
32
34
  }.to raise_error(converted_exception.class) do |actual_exception|
33
- expect(actual_exception.class).to eq(converted_exception.class)
34
- expect(actual_exception.key).to eq(converted_exception.key)
35
- expect(actual_exception.locale).to eq(converted_exception.locale)
36
- expect(actual_exception.options).to eq(converted_exception.options)
35
+ actual_exception.class == converted_exception.class
36
+ actual_exception.key.should == converted_exception.key
37
+ actual_exception.locale.should == converted_exception.locale
38
+ actual_exception.options.should == converted_exception.options
37
39
  end
38
40
  end
39
41
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Spec::PathnameCollision do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Spec::PathnameCollision do
2
4
  let(:pathname) do
3
5
  Metasploit::Model::Spec.temporary_pathname.join('pathname')
4
6
  end
@@ -7,7 +9,7 @@ RSpec.describe Metasploit::Model::Spec::PathnameCollision do
7
9
  described_class.new(pathname)
8
10
  end
9
11
 
10
- it { is_expected.to be_a Metasploit::Model::Spec::Error }
12
+ it { should be_a Metasploit::Model::Spec::Error }
11
13
 
12
14
  context 'check!' do
13
15
  subject(:check!) do
@@ -42,11 +44,11 @@ RSpec.describe Metasploit::Model::Spec::PathnameCollision do
42
44
  end
43
45
 
44
46
  it 'should include pathname' do
45
- expect(message).to include("#{pathname} already exists.")
47
+ message.should include("#{pathname} already exists.")
46
48
  end
47
49
 
48
50
  it 'should include potential cause' do
49
- expect(message).to include('Metasploit::Model::Spec.remove_temporary_pathname was not called after the previous spec.')
51
+ message.should include('Metasploit::Model::Spec.remove_temporary_pathname was not called after the previous spec.')
50
52
  end
51
53
  end
52
54
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Spec do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Spec do
2
4
  before(:each) do
3
5
  @before_temporary_pathname = described_class.send(:remove_instance_variable, :@temporary_pathname)
4
6
  end
@@ -33,11 +35,11 @@ RSpec.describe Metasploit::Model::Spec do
33
35
  end
34
36
 
35
37
  it 'should remove file tree' do
36
- expect(pathname.exist?).to eq(true)
38
+ pathname.exist?.should be_true
37
39
 
38
40
  remove_temporary_pathname
39
41
 
40
- expect(pathname.exist?).to eq(false)
42
+ pathname.exist?.should be_false
41
43
  end
42
44
  end
43
45
 
@@ -80,7 +82,7 @@ RSpec.describe Metasploit::Model::Spec do
80
82
  end
81
83
 
82
84
  it 'should return set pathname' do
83
- expect(temporary_pathname).to eq(pathname)
85
+ temporary_pathname.should == pathname
84
86
  end
85
87
  end
86
88
 
@@ -105,11 +107,7 @@ RSpec.describe Metasploit::Model::Spec do
105
107
  expect {
106
108
  described_class.temporary_pathname = temporary_pathname
107
109
  }.to change {
108
- if described_class.instance_variable_defined? :@temporary_pathname
109
- described_class.instance_variable_get(:@temporary_pathname)
110
- else
111
- nil
112
- end
110
+ described_class.instance_variable_get(:@temporary_pathname)
113
111
  }.to(temporary_pathname)
114
112
  end
115
113
  end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Translation do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Translation do
2
4
  let(:base_class) do
3
5
  described_class = self.described_class
4
6
 
@@ -54,21 +56,21 @@ RSpec.describe Metasploit::Model::Translation do
54
56
  end
55
57
 
56
58
  it 'should have named and unnamed ancestors' do
57
- expect(base_class.ancestors).to include(named_class)
58
- expect(base_class.ancestors).to include(named_module)
59
- expect(base_class.ancestors).to include(unnamed_class)
60
- expect(base_class.ancestors).to include(unnamed_module)
59
+ base_class.ancestors.should include(named_class)
60
+ base_class.ancestors.should include(named_module)
61
+ base_class.ancestors.should include(unnamed_class)
62
+ base_class.ancestors.should include(unnamed_module)
61
63
  end
62
64
 
63
65
  it 'should return all ancestors that respond to model_name' do
64
- expect(lookup_ancestors).to include(base_class)
65
- expect(lookup_ancestors).to include(named_class)
66
- expect(lookup_ancestors).to include(named_module)
66
+ lookup_ancestors.should include(base_class)
67
+ lookup_ancestors.should include(named_class)
68
+ lookup_ancestors.should include(named_module)
67
69
  end
68
70
 
69
71
  it 'should not return ancestors that do not respond to model_name' do
70
- expect(lookup_ancestors).not_to include(unnamed_class)
71
- expect(lookup_ancestors).not_to include(unnamed_module)
72
+ lookup_ancestors.should_not include(unnamed_class)
73
+ lookup_ancestors.should_not include(unnamed_module)
72
74
  end
73
75
  end
74
76