spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb in metasploit-model-1.0.0.pre.rails.pre.4.0 vs spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb in metasploit-model-1.0.0

- old
+ new

@@ -1,16 +1,16 @@ -shared_examples_for 'Metasploit::Model::Search::Operation::Value::Integer' do +RSpec.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 { should include Metasploit::Model::Search::Operation::Value::Integer } + it { is_expected.to 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 - value.should == formatted_value + expect(value).to eq(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 - value.should == integer + expect(value).to eq(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 - value.should_not == integer + expect(value).not_to eq(integer) end it 'should pass through the full value' do - value.should == formatted_value + expect(value).to eq(formatted_value) end end context 'with Float' do let(:formatted_value) do 0.1 end it 'should not truncate Float to Integer' do - value.should_not == formatted_value.to_i + expect(value).not_to eq(formatted_value.to_i) end it 'should pass through Float' do - value.should == formatted_value + expect(value).to eq(formatted_value) end end end end \ No newline at end of file