spec/rubocop/cop/rspec/example_wording_spec.rb in rubocop-rspec-1.2.0 vs spec/rubocop/cop/rspec/example_wording_spec.rb in rubocop-rspec-1.2.1
- old
+ new
@@ -1,15 +1,13 @@
# encoding: utf-8
-require 'spec_helper'
-
describe RuboCop::Cop::RSpec::ExampleWording, :config do
subject(:cop) { described_class.new(config) }
let(:cop_config) do
{
'CustomTransform' => { 'have' => 'has', 'not' => 'does not' },
- 'IgnoredWords' => %w(only realy)
+ 'IgnoredWords' => %w(only really)
}
end
it 'finds description with `should` at the beginning' do
inspect_source(cop, ["it 'should do something' do", 'end'])
@@ -42,10 +40,10 @@
'should do nothing' => 'does nothing',
'should have sweets' => 'has sweets',
'should worry about the future' => 'worries about the future',
'should pay for pizza' => 'pays for pizza',
'should miss me' => 'misses me',
- 'should realy only return one item' => 'realy only returns one item'
+ 'should really only return one item' => 'really only returns one item'
}.each do |old, new|
it 'autocorrects an offenses' do
new_source = autocorrect_source(cop, ["it '#{old}' do", 'end'])
expect(new_source).to eq("it '#{new}' do\nend")
end