spec/actors/mentioner_spec.rb in socialization-1.2.3 vs spec/actors/mentioner_spec.rb in socialization-2.0.0

- old
+ new

@@ -45,18 +45,17 @@ it "does not accept non-mentionables" do expect { @mentioner.unmention!(:foo) }.to raise_error(Socialization::ArgumentError) end it "unmentions when mentioning" do - expect(@mentioner).to receive(:mentions?).with(@mentionable).once.and_return(true) - expect(@mentioner).to receive(:unmention!).with(@mentionable).once + @mentioner.mention!(@mentionable) @mentioner.toggle_mention!(@mentionable) + expect(@mentioner.mentions?(@mentionable)).to eq false end it "mentions when not mentioning" do - expect(@mentioner).to receive(:mentions?).with(@mentionable).once.and_return(false) - expect(@mentioner).to receive(:mention!).with(@mentionable).once @mentioner.toggle_mention!(@mentionable) + expect(@mentioner.mentions?(@mentionable)).to eq true end end describe "#mentions?" do it "does not accept non-mentionables" do