Skip to content

Commit 0ea9f02

Browse files
committed
Please RuboCop
The previous commit (0a72fd8) was kept simple so the diff was easier to read. This now makes it pass with RuboCop.
1 parent 0a72fd8 commit 0ea9f02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rspec-puppet/monkey_patches.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class RSpec::Puppet::EventListener
1313
def self.example_started(example)
1414
@rspec_puppet_example = example.example.example_group.ancestors.include?(RSpec::Puppet::Support)
1515
@current_example = example.example
16-
if !@current_example.respond_to?(:environment) && @current_example.respond_to?(:example_group_instance)
17-
@current_example = @current_example.example_group_instance
18-
end
16+
return unless !@current_example.respond_to?(:environment) && @current_example.respond_to?(:example_group_instance)
17+
18+
@current_example = @current_example.example_group_instance
1919
end
2020

2121
def self.example_passed(_example)

0 commit comments

Comments
 (0)