Skip to content

Commit e0deeca

Browse files
committed
Update rspec test syntax to use 'expect'
1 parent 1ec4a98 commit e0deeca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

spec/bitbucket_rest_api/core_ext/hash_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
context '#except' do
2626
it 'should respond to except' do
27-
@nested_hash.should respond_to :except
27+
expect(@nested_hash).to respond_to :except
2828
end
2929

3030
# TODO fix this test after fixing except!
@@ -35,33 +35,33 @@
3535

3636
context '#symbolize_keys' do
3737
it 'should respond to symbolize_keys' do
38-
@nested_hash.should respond_to :symbolize_keys
38+
expect(@nested_hash).to respond_to :symbolize_keys
3939
end
4040
end
4141

4242
context '#symbolize_keys!' do
4343
it 'should respond to symbolize_keys!' do
44-
@nested_hash.should respond_to :symbolize_keys!
44+
expect(@nested_hash).to respond_to :symbolize_keys!
4545
end
4646

4747
it 'should convert nested keys to symbols' do
48-
@nested_hash.symbolize_keys!.should == @symbols
48+
expect(@nested_hash.symbolize_keys!).to eq @symbols
4949
end
5050
end
5151

5252
context '#serialize' do
5353
it 'should respond to serialize' do
54-
@nested_hash.should respond_to :serialize
54+
expect(@nested_hash).to respond_to :serialize
5555
end
5656

5757
it 'should serialize hash' do
58-
@hash.serialize.should == @serialized
58+
expect(@hash.serialize).to eq @serialized
5959
end
6060
end
6161

6262
context '#deep_key?' do
6363
it 'should find key inside nested hash' do
64-
@nested_hash.has_deep_key?('c').should be_truthy
64+
expect(@nested_hash.has_deep_key?('c')).to be_truthy
6565
end
6666
end
6767
end # Hash

spec/bitbucket_rest_api/deprecation_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let(:method) { 'create_repos'}
55
let(:alt_method) { 'repos.create'}
66

7-
it { described_class.constants.should include :DEPRECATION_PREFIX }
7+
it { expect(described_class.constants).to include :DEPRECATION_PREFIX }
88

99
context '.deprecate' do
1010
before do

spec/bitbucket_rest_api/normalizer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
it 'should stringify all the keys inside nested hash' do
2525
actual = subject.normalize! hash
2626
expected = { 'a' => { 'b'=> { 'c' => 1 }, 'd' => ['a', { 'e'=> 2 }] } }
27-
actual.should be_eql expected
27+
expect(actual).to eq expected
2828
end
2929
end
3030
end # BitBucket::Normalizer

0 commit comments

Comments
 (0)