spec/rubocop/rspec/wording_spec.rb in rubocop-rspec-1.15.0 vs spec/rubocop/rspec/wording_spec.rb in rubocop-rspec-1.15.1
- old
+ new
@@ -1,14 +1,9 @@
RSpec.describe RuboCop::RSpec::Wording do
- let(:replacements) do
- { 'have' => 'has', 'not' => 'does not' }
- end
+ let(:replacements) { { 'have' => 'has' } }
+ let(:ignores) { %w[only really] }
- let(:ignores) do
- %w(only really)
- end
-
expected_rewrites =
{
'should return something' => 'returns something',
'should not return something' => 'does not return something',
'should do nothing' => 'does nothing',
@@ -24,10 +19,21 @@
'should echo the input' => 'echoes the input',
'should alias the method' => 'aliases the method',
'should search the internet' => 'searches the internet',
'should wish me luck' => 'wishes me luck',
'should really only return one item' => 'really only returns one item',
- "shouldn't return something" => 'does not return something'
+ "shouldn't return something" => 'does not return something',
+ 'SHOULD RETAIN UPPERCASE' => 'RETAINS UPPERCASE',
+ "shouldn't be true" => 'is not true',
+ "SHOULDN'T BE true" => 'IS NOT true',
+ "SHOULDN'T NOT RETAIN UPPERCASE" => 'DOES NOT NOT RETAIN UPPERCASE',
+ 'should WORRY' => 'WORRIES',
+ 'should WISH me luck' => 'WISHES me luck',
+ '' => '',
+ 'should' => '',
+ "shouldn't" => 'does not',
+ 'should not' => 'does not',
+ 'should fizz' => 'fizzes'
}
expected_rewrites.each do |old, new|
it %(rewrites "#{old}" as "#{new}") do
rewrite =