From e8f19e004e26a99a13d41f541925c31005ff2bf4 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 21 Aug 2017 22:28:43 +0900 Subject: [PATCH] Use `find` instead. --- spec/components/discourse_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/components/discourse_spec.rb b/spec/components/discourse_spec.rb index d887a4dde9a..a0047900a86 100644 --- a/spec/components/discourse_spec.rb +++ b/spec/components/discourse_spec.rb @@ -108,7 +108,7 @@ describe Discourse do yield end - messages.first { |m| m.channel == Discourse.readonly_channel } + messages.find { |m| m.channel == Discourse.readonly_channel } end describe ".enable_readonly_mode" do