From 57f7b92bb4c41ee8760f24788392d11006fd8a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 25 Sep 2014 18:11:53 +0200 Subject: [PATCH] fix poll plugin specs deprecations --- plugins/poll/spec/poll_plugin/poll_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/poll/spec/poll_plugin/poll_spec.rb b/plugins/poll/spec/poll_plugin/poll_spec.rb index 816738ea9f7..7455f8856a1 100644 --- a/plugins/poll/spec/poll_plugin/poll_spec.rb +++ b/plugins/poll/spec/poll_plugin/poll_spec.rb @@ -7,20 +7,20 @@ describe PollPlugin::Poll do let(:user) { Fabricate(:user) } it "should detect poll post correctly" do - expect(poll.is_poll?).should == true + expect(poll.is_poll?).to be_truthy post2 = create_post(topic: topic, raw: "This is a generic reply.") - expect(PollPlugin::Poll.new(post2).is_poll?).should == false + expect(PollPlugin::Poll.new(post2).is_poll?).to be_falsey post.topic.title = "Not a poll" - expect(poll.is_poll?).should == false + expect(poll.is_poll?).to be_falsey end it "strips whitespace from the prefix translation" do topic.title = "Polll: This might be a poll" topic.save - expect(PollPlugin::Poll.new(post).is_poll?).should == false + expect(PollPlugin::Poll.new(post).is_poll?).to be_falsey I18n.expects(:t).with('poll.prefix').returns("Polll ") I18n.expects(:t).with('poll.closed_prefix').returns("Closed Poll ") - expect(PollPlugin::Poll.new(post).is_poll?).should == true + expect(PollPlugin::Poll.new(post).is_poll?).to be_truthy end it "should get options correctly" do