spec/wcc/plugin_spec.rb in danger-wcc-0.1.0 vs spec/wcc/plugin_spec.rb in danger-wcc-0.1.1
- old
+ new
@@ -15,15 +15,18 @@
end
end
describe 'all' do
it 'runs all default and passes default options' do
- %i[rubocop_exceptions flay todos brakeman dependencies].each do |check|
+ %i[
+ rubocop_exceptions todos brakeman
+ dependencies yarn_deduplicate
+ ].each do |check|
expect(@my_plugin).to receive(check)
.with({})
end
- %i[commit_lint reek jshint].each do |check|
+ %i[commit_lint flay reek jshint].each do |check|
expect(@my_plugin).to_not receive(check)
end
# act
@my_plugin.all
@@ -45,17 +48,18 @@
end
it 'runs only enabled checks' do
options = {
rubocop_exceptions: false,
+ yarn_deduplicate: false,
todos: false,
brakeman: false,
reek: true
}
# expect
expect(@my_plugin).to receive(:reek)
- expect(@my_plugin).to receive(:flay)
+ expect(@my_plugin).to receive(:dependencies)
expect(@my_plugin).to_not receive(:rubocop_exceptions)
expect(@my_plugin).to_not receive(:commit_lint)
# act
@my_plugin.all options