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