-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RSpec: use expect assertion syntax (#258)
Back in RSpec 2.11, a new expectation syntax was introduced. Check out the blog post that outlines the shortcomings of the `should` syntax and how these are resolved with the new `expect` syntax. https://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ I propose the RSpec test suite be migrated to this `expect` syntax. Luckily this is quite easy as there is a conversion tool that does all the heavy lifting: [transpec](http://yujinakayama.me/transpec/). I ran this tool across the test suite and this pull request consists of the changes.
- Loading branch information
Showing
166 changed files
with
1,421 additions
and
1,350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe '#auth(password) [mock only]' do | ||
RSpec.describe '#auth(password) [mock only]' do | ||
it "just returns 'OK'" do | ||
@redises.mock.auth('foo').should == 'OK' | ||
expect(@redises.mock.auth('foo')).to eq('OK') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe '#bgrewriteaof [mock only]' do | ||
RSpec.describe '#bgrewriteaof [mock only]' do | ||
it 'just returns a canned string' do | ||
@redises.mock.bgrewriteaof.should =~ /append/ | ||
expect(@redises.mock.bgrewriteaof).to match(/append/) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe '#bgsave [mock only]' do | ||
RSpec.describe '#bgsave [mock only]' do | ||
it 'just returns a canned string' do | ||
@redises.mock.bgsave.should =~ /saving/ | ||
expect(@redises.mock.bgsave).to match(/saving/) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.