Skip to content

Commit

Permalink
Please RuboCop
Browse files Browse the repository at this point in the history
The previous commit (0a72fd8) was kept
simple so the diff was easier to read. This now makes it pass with
RuboCop.
  • Loading branch information
ekohl committed Oct 2, 2023
1 parent 0a72fd8 commit 0ea9f02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rspec-puppet/monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class RSpec::Puppet::EventListener
def self.example_started(example)
@rspec_puppet_example = example.example.example_group.ancestors.include?(RSpec::Puppet::Support)
@current_example = example.example
if !@current_example.respond_to?(:environment) && @current_example.respond_to?(:example_group_instance)
@current_example = @current_example.example_group_instance
end
return unless !@current_example.respond_to?(:environment) && @current_example.respond_to?(:example_group_instance)

@current_example = @current_example.example_group_instance
end

def self.example_passed(_example)
Expand Down

0 comments on commit 0ea9f02

Please sign in to comment.