Rubocop RSpec 描述失败
Rubocop RSpec Describes are failing
实际上我正在尝试解决该问题:
Do not use multiple top level describes - try to nest them.
The first argument to describe should be the class or module being tested.
我有八个这种格式的测试:
describe 'PublicanCreatorsCreate.init_docu_work' do
it 'accesses a directory and creates there an initial documentation' do
PublicanCreatorsCreate.init_docu_work(title, type, language, brand, db5)
Dir.exist?(title)
:should == true
end
end
但什么是假的?第一个参数包含测试的 class 和方法。
通常这样的描述会写成:
describe PublicanCreatorsCreate, '.init_docu_work' do
或
describe PublicanCreatorsCreate do
describe '.init_docu_work' do
听起来 rubocop-rspec 期待第二种形式。
实际上我正在尝试解决该问题:
Do not use multiple top level describes - try to nest them.
The first argument to describe should be the class or module being tested.
我有八个这种格式的测试:
describe 'PublicanCreatorsCreate.init_docu_work' do
it 'accesses a directory and creates there an initial documentation' do
PublicanCreatorsCreate.init_docu_work(title, type, language, brand, db5)
Dir.exist?(title)
:should == true
end
end
但什么是假的?第一个参数包含测试的 class 和方法。
通常这样的描述会写成:
describe PublicanCreatorsCreate, '.init_docu_work' do
或
describe PublicanCreatorsCreate do
describe '.init_docu_work' do
听起来 rubocop-rspec 期待第二种形式。