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,3 +1,139 @@
1
- RSpec.describe Metasploit::Model::Version do
2
- it_should_behave_like 'Metasploit::Version Version Module'
3
- end
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Version do
4
+ context 'CONSTANTS' do
5
+ context 'MAJOR' do
6
+ subject(:major) do
7
+ described_class::MAJOR
8
+ end
9
+
10
+ it { should be_a Integer }
11
+ end
12
+
13
+ context 'MINOR' do
14
+ subject(:minor) do
15
+ described_class::MINOR
16
+ end
17
+
18
+ it { should be_a Integer }
19
+ end
20
+
21
+ context 'PATCH' do
22
+ subject(:patch) do
23
+ described_class::PATCH
24
+ end
25
+
26
+ it { should be_a Integer }
27
+ end
28
+
29
+ pull_request = ENV['TRAVIS_PULL_REQUEST']
30
+
31
+ # a pull request cannot check PRERELEASE because it will be tested in the target branch, but the source itself
32
+ # is from the source branch and so has the source branch PRERELEASE.
33
+ #
34
+ # PRERELEASE can only be set appropriately for a merge by merging to the target branch and then updating PRERELEASE
35
+ # on the target branch before committing and/or pushing to github and travis-ci.
36
+ if pull_request.nil? || pull_request == 'false'
37
+ context 'PREPRELEASE' do
38
+ subject(:prerelease) do
39
+ described_class::PRERELEASE
40
+ end
41
+
42
+ branch = ENV['TRAVIS_BRANCH']
43
+
44
+ if branch.blank?
45
+ branch = `git rev-parse --abbrev-ref HEAD`.strip
46
+ end
47
+
48
+ if branch == 'master'
49
+ it 'does not have a PRERELEASE' do
50
+ expect(defined? described_class::PRERELEASE).to be_nil
51
+ end
52
+ else
53
+ branch_regex = /\A(?<type>bug|chore|feature|staging)(\/(?<story>[^\/]+))?\/(?<prerelease>[^\/]+)\z/
54
+ match = branch.match(branch_regex)
55
+
56
+ if match
57
+ it 'matches the branch relative name' do
58
+ expect(prerelease).to eq(match[:prerelease])
59
+ end
60
+ else
61
+ tag_regex = /\Av(?<major>\d+).(?<minor>\d+).(?<patch>\d+)(\.pre\.(?<prerelease>.*))?\z/
62
+ # travis-ci sets TRAVIS_BRANCH to the tag name for tag builds
63
+ match = branch.match(tag_regex)
64
+
65
+ if match
66
+ tag_prerelease = match[:prerelease]
67
+
68
+ if tag_prerelease
69
+ it 'matches the tag prerelease converted from a gem version to a VERSION' do
70
+ expect(prerelease).to eq(tag_prerelease.gsub('.pre.', '-'))
71
+ end
72
+ else
73
+ it 'does not have a PRERELEASE' do
74
+ expect(defined? described_class::PRERELEASE).to be_nil
75
+ end
76
+ end
77
+ else
78
+ it 'has a abbreviated reference that can be parsed for prerelease' do
79
+ fail "Do not know how to parse #{branch.inspect} for PRERELEASE"
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
87
+
88
+ context 'full' do
89
+ subject(:full) do
90
+ described_class.full
91
+ end
92
+
93
+ #
94
+ # lets
95
+ #
96
+
97
+ let(:major) do
98
+ 1
99
+ end
100
+
101
+ let(:minor) do
102
+ 2
103
+ end
104
+
105
+ let(:patch) do
106
+ 3
107
+ end
108
+
109
+ before(:each) do
110
+ stub_const("#{described_class}::MAJOR", major)
111
+ stub_const("#{described_class}::MINOR", minor)
112
+ stub_const("#{described_class}::PATCH", patch)
113
+ end
114
+
115
+ context 'with PRERELEASE' do
116
+ let(:prerelease) do
117
+ 'prerelease'
118
+ end
119
+
120
+ before(:each) do
121
+ stub_const("#{described_class}::PRERELEASE", prerelease)
122
+ end
123
+
124
+ it 'is <major>.<minor>.<patch>-<prerelease>' do
125
+ expect(full).to eq("#{major}.#{minor}.#{patch}-#{prerelease}")
126
+ end
127
+ end
128
+
129
+ context 'without PRERELEASE' do
130
+ before(:each) do
131
+ hide_const("#{described_class}::PRERELEASE")
132
+ end
133
+
134
+ it 'is <major>.<minor>.<patch>' do
135
+ expect(full).to eq("#{major}.#{minor}.#{patch}")
136
+ end
137
+ end
138
+ end
139
+ end
@@ -1,4 +1,6 @@
1
- RSpec.describe Metasploit::Model::Visitation::Visit do
1
+ require 'spec_helper'
2
+
3
+ describe Metasploit::Model::Visitation::Visit do
2
4
  let(:base_class) do
3
5
  described_class = self.described_class
4
6
 
@@ -52,15 +54,15 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
52
54
  end
53
55
 
54
56
  it 'should return Array(Metasploit::Model::Visitation::Visitor)' do
55
- expect(visit).to be_an Array
56
- expect(visit.length).to eq(1)
57
- expect(visit.first).to be_a Metasploit::Model::Visitation::Visitor
57
+ visit.should be_an Array
58
+ visit.length.should == 1
59
+ visit.first.should be_a Metasploit::Model::Visitation::Visitor
58
60
  end
59
61
 
60
62
  it 'should add Metasploit::Model::Visitation::Visitor to visitor_by_module_name' do
61
63
  visitor = visit.first
62
64
 
63
- expect(base_class.visitor_by_module_name[mod.name]).to eq(visitor)
65
+ base_class.visitor_by_module_name[mod.name].should == visitor
64
66
  end
65
67
  end
66
68
 
@@ -86,22 +88,18 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
86
88
  end
87
89
 
88
90
  it 'should return Array<Metasploit::Model::Visitation::Visitor>' do
89
- expect(visit).to be_an Array
90
- expect(visit.length).to eq(module_names.length)
91
-
92
- expect(
93
- visit.all? { |visitor|
94
- visitor.is_a? Metasploit::Model::Visitation::Visitor
95
- }
96
- ).to eq(true)
91
+ visit.should be_an Array
92
+ visit.length.should == module_names.length
93
+
94
+ visit.all? { |visitor|
95
+ visitor.is_a? Metasploit::Model::Visitation::Visitor
96
+ }.should be_true
97
97
  end
98
98
 
99
99
  it 'should each Metasploit::Model::Visitation::Visitor to visitor_by_module_name' do
100
- expect(
101
- module_names.all? { |module_name|
102
- visit.include? base_class.visitor_by_module_name[module_name]
103
- }
104
- ).to eq(true)
100
+ module_names.all? { |module_name|
101
+ visit.include? base_class.visitor_by_module_name[module_name]
102
+ }.should be_true
105
103
  end
106
104
  end
107
105
  end
@@ -160,7 +158,7 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
160
158
  end
161
159
 
162
160
  it 'should return visitor from visitor_by_module' do
163
- expect(visitor).to eq(klass_visitor)
161
+ visitor.should == klass_visitor
164
162
  end
165
163
  end
166
164
 
@@ -189,13 +187,13 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
189
187
  end
190
188
 
191
189
  it 'should return ancestor visitor' do
192
- expect(visitor).to eq(ancestor_visitor)
190
+ visitor.should == ancestor_visitor
193
191
  end
194
192
 
195
193
  it 'should cache ancestor visitor as visitor for klass in visitor_by_module' do
196
194
  visitor
197
195
 
198
- expect(base_class.visitor_by_module[klass]).to eq(ancestor_visitor)
196
+ base_class.visitor_by_module[klass].should == ancestor_visitor
199
197
  end
200
198
  end
201
199
 
@@ -205,13 +203,13 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
205
203
  end
206
204
 
207
205
  it 'should return ancestor visitor' do
208
- expect(visitor).to eq(ancestor_visitor)
206
+ visitor.should == ancestor_visitor
209
207
  end
210
208
 
211
209
  it 'should cache ancestor visitor as visitor for klass in visitor_by_module' do
212
210
  visitor
213
211
 
214
- expect(base_class.visitor_by_module[klass]).to eq(ancestor_visitor)
212
+ base_class.visitor_by_module[klass].should == ancestor_visitor
215
213
  end
216
214
  end
217
215
 
@@ -231,7 +229,7 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
231
229
  end
232
230
 
233
231
  it 'should default to empty Hash' do
234
- expect(visitor_by_module).to eq({})
232
+ visitor_by_module.should == {}
235
233
  end
236
234
  end
237
235
 
@@ -241,7 +239,7 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
241
239
  end
242
240
 
243
241
  it 'should default to empty Hash' do
244
- expect(visitor_by_module_name).to eq({})
242
+ visitor_by_module_name.should == {}
245
243
  end
246
244
  end
247
245
 
@@ -276,13 +274,13 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
276
274
  end
277
275
 
278
276
  it 'should find visitor for node.class' do
279
- expect(base_class).to receive(:visitor).with(node.class).and_call_original
277
+ base_class.should_receive(:visitor).with(node.class).and_call_original
280
278
 
281
279
  visit
282
280
  end
283
281
 
284
282
  it 'should visit on visitor' do
285
- expect(@visitor).to receive(:visit).with(base_instance, node)
283
+ @visitor.should_receive(:visit).with(base_instance, node)
286
284
 
287
285
  visit
288
286
  end
@@ -311,7 +309,7 @@ RSpec.describe Metasploit::Model::Visitation::Visit do
311
309
  end
312
310
 
313
311
  it "should be able to call visit from inside a visitor's block" do
314
- expect(visit).to eq(leaf_node)
312
+ visit.should == leaf_node
315
313
  end
316
314
  end
317
315
  end
@@ -1,3 +1,5 @@
1
+ require 'spec_helper'
2
+
1
3
  RSpec.describe 'validate_nilness_of' do
2
4
  let(:record) {
3
5
  record_class.new
data/spec/spec_helper.rb CHANGED
@@ -14,95 +14,22 @@ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
14
14
 
15
15
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
16
16
  require 'rspec/rails'
17
+ require 'rspec/autorun'
17
18
 
18
- # Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
19
- gem_specification = Gem::Specification.find_all_by_name('metasploit-version').first
19
+ # full backtrace in logs so its easier to trace errors
20
+ Rails.backtrace_cleaner.remove_silencers!
20
21
 
21
- roots = [
22
- Metasploit::Model::Engine.root.to_path,
23
- gem_specification.gem_dir
24
- ]
22
+ spec_pathname = Metasploit::Model::Engine.root.join('spec')
25
23
 
26
- roots.each do |root|
27
- Dir[File.join(root, 'spec', 'support', '**', '*.rb')].each do |f|
28
- require f
29
- end
24
+ Dir[spec_pathname.join('support', '**', '*.rb')].each do |f|
25
+ require f
30
26
  end
31
27
 
32
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
33
28
  RSpec.configure do |config|
34
- # rspec-expectations config goes here. You can use an alternate
35
- # assertion/expectation library such as wrong or the stdlib/minitest
36
- # assertions if you prefer.
37
- config.expect_with :rspec do |expectations|
38
- # This option will default to `true` in RSpec 4. It makes the `description`
39
- # and `failure_message` of custom matchers include text for helper methods
40
- # defined using `chain`, e.g.:
41
- # be_bigger_than(2).and_smaller_than(4).description
42
- # # => "be bigger than 2 and smaller than 4"
43
- # ...rather than:
44
- # # => "be bigger than 2"
45
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
46
- end
47
-
48
- # rspec-mocks config goes here. You can use an alternate test double
49
- # library (such as bogus or mocha) by changing the `mock_with` option here.
50
- config.mock_with :rspec do |mocks|
51
- # Prevents you from mocking or stubbing a method that does not exist on
52
- # a real object. This is generally recommended, and will default to
53
- # `true` in RSpec 4.
54
- mocks.verify_partial_doubles = true
55
- end
56
-
57
- # These two settings work together to allow you to limit a spec run
58
- # to individual examples or groups you care about by tagging them with
59
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
60
- # get run.
61
- config.filter_run :focus
62
- config.run_all_when_everything_filtered = true
63
-
64
- # Limits the available syntax to the non-monkey patched syntax that is
65
- # recommended. For more details, see:
66
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
67
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
68
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
69
- config.disable_monkey_patching!
70
-
71
- # This setting enables warnings. It's recommended, but in some cases may
72
- # be too noisy due to issues in dependencies.
73
- config.warnings = true
74
-
75
- # Many RSpec users commonly either run the entire suite or an individual
76
- # file, and it's useful to allow more verbose output when running an
77
- # individual spec file.
78
- if config.files_to_run.one?
79
- # Use the documentation formatter for detailed output,
80
- # unless a formatter has already been configured
81
- # (e.g. via a command-line flag).
82
- config.default_formatter = 'doc'
83
- end
84
-
85
- # Print the 10 slowest examples and example groups at the
86
- # end of the spec run, to help surface which specs are running
87
- # particularly slow.
88
- config.profile_examples = 10
89
-
90
- # Run specs in random order to surface order dependencies. If you find an
91
- # order dependency and want to debug it, you can fix the order by providing
92
- # the seed, which is printed after each run.
93
- # --seed 1234
94
- config.order = :random
95
-
96
- # Seed global randomization in this process using the `--seed` CLI option.
97
- # Setting this allows you to use `--seed` to deterministically reproduce
98
- # test failures related to randomization by passing the same `--seed` value
99
- # as the one that triggered the failure.
100
- Kernel.srand config.seed
101
-
102
29
  config.before(:suite) do
103
30
  # this must be explicitly set here because it should always be spec/tmp for w/e project is using
104
31
  # Metasploit::Model::Spec to handle file system clean up.
105
- Metasploit::Model::Spec.temporary_pathname = Metasploit::Model::Engine.root.join('spec', 'tmp')
32
+ Metasploit::Model::Spec.temporary_pathname = spec_pathname.join('tmp')
106
33
  # Clean up any left over files from a previously aborted suite
107
34
  Metasploit::Model::Spec.remove_temporary_pathname
108
35
 
@@ -113,4 +40,7 @@ RSpec.configure do |config|
113
40
  config.after(:each) do
114
41
  Metasploit::Model::Spec.remove_temporary_pathname
115
42
  end
43
+
44
+ config.mock_with :rspec
45
+ config.order = :random
116
46
  end
@@ -1,4 +1,4 @@
1
- RSpec.shared_context 'Metasploit::Model::Search::Operator::Group::Union#children' do
1
+ shared_context 'Metasploit::Model::Search::Operator::Group::Union#children' do
2
2
  subject(:children) do
3
3
  operator.children(formatted_value)
4
4
  end
@@ -1,4 +1,4 @@
1
- RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer' do
1
+ shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer' do
2
2
  let(:operation_class) do
3
3
  described_class
4
4
  end
@@ -8,7 +8,7 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer'
8
8
  operation_class
9
9
  end
10
10
 
11
- it { is_expected.to include Metasploit::Model::Search::Operation::Value::Integer }
11
+ it { should include Metasploit::Model::Search::Operation::Value::Integer }
12
12
  end
13
13
 
14
14
  context '#value' do
@@ -26,7 +26,7 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer'
26
26
  end
27
27
 
28
28
  it 'should pass through Integer' do
29
- expect(value).to eq(formatted_value)
29
+ value.should == formatted_value
30
30
  end
31
31
  end
32
32
 
@@ -40,7 +40,7 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer'
40
40
  end
41
41
 
42
42
  it 'should convert String to Integer' do
43
- expect(value).to eq(integer)
43
+ value.should == integer
44
44
  end
45
45
  end
46
46
 
@@ -54,11 +54,11 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer'
54
54
  end
55
55
 
56
56
  it 'should not extract the number' do
57
- expect(value).not_to eq(integer)
57
+ value.should_not == integer
58
58
  end
59
59
 
60
60
  it 'should pass through the full value' do
61
- expect(value).to eq(formatted_value)
61
+ value.should == formatted_value
62
62
  end
63
63
  end
64
64
 
@@ -68,11 +68,11 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer'
68
68
  end
69
69
 
70
70
  it 'should not truncate Float to Integer' do
71
- expect(value).not_to eq(formatted_value.to_i)
71
+ value.should_not == formatted_value.to_i
72
72
  end
73
73
 
74
74
  it 'should pass through Float' do
75
- expect(value).to eq(formatted_value)
75
+ value.should == formatted_value
76
76
  end
77
77
  end
78
78
  end