Skip to content

Commit

Permalink
Add nil guard in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ABaldwinHunter committed Dec 28, 2015
1 parent 63c7ac5 commit 342a501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/cc/engine/rubocop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def includes_check?(output, cop_name)
def includes_content_for?(output, cop_name)
issue = issues(output).detect { |i| i["check_name"] =~ /#{cop_name}$/ }

issue["content"]["body"].present?
issue["content"] && issue["content"]["body"].present?
end

def issues(output)
Expand Down

0 comments on commit 342a501

Please sign in to comment.