spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb in metasploit-model-0.30.2-java vs spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb in metasploit-model-1.0.0.pre.rails.pre.4.0
- old
+ new
@@ -1,16 +1,16 @@
-RSpec.shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer' do
+shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer' do
let(:operation_class) do
described_class
end
context '#class' do
subject do
operation_class
end
- it { is_expected.to include Metasploit::Model::Search::Operation::Value::Integer }
+ it { should include Metasploit::Model::Search::Operation::Value::Integer }
end
context '#value' do
subject(:value) do
operation.value
@@ -24,11 +24,11 @@
let(:formatted_value) do
1
end
it 'should pass through Integer' do
- expect(value).to eq(formatted_value)
+ value.should == formatted_value
end
end
context 'with Integer#to_s' do
let(:formatted_value) do
@@ -38,11 +38,11 @@
let(:integer) do
1
end
it 'should convert String to Integer' do
- expect(value).to eq(integer)
+ value.should == integer
end
end
context 'with mix text and numerals' do
let(:formatted_value) do
@@ -52,28 +52,28 @@
let(:integer) do
123
end
it 'should not extract the number' do
- expect(value).not_to eq(integer)
+ value.should_not == integer
end
it 'should pass through the full value' do
- expect(value).to eq(formatted_value)
+ value.should == formatted_value
end
end
context 'with Float' do
let(:formatted_value) do
0.1
end
it 'should not truncate Float to Integer' do
- expect(value).not_to eq(formatted_value.to_i)
+ value.should_not == formatted_value.to_i
end
it 'should pass through Float' do
- expect(value).to eq(formatted_value)
+ value.should == formatted_value
end
end
end
end
\ No newline at end of file