spec/lita/handlers/whoami_spec.rb in lita-whoami-0.1.2 vs spec/lita/handlers/whoami_spec.rb in lita-whoami-0.1.3
- old
+ new
@@ -9,13 +9,35 @@
expect(replies.last).to eq "Okay, taylor is a bad programmer!"
end
it "Can tell you what people are." do
send_command("taylor is a bad programmer")
- expect(replies).to_not be_empty
- expect(replies.last).to eq "Okay, taylor is a bad programmer!"
+ send_command("who is taylor")
+ expect(replies.last).to eq "taylor is a bad programmer"
+ expect(replies.count).to eq 2
+ end
+
+ it "Can unassign a descriptior from someone." do
+ send_command("taylor is a bad programmer")
send_command("who is taylor")
+
expect(replies.last).to eq "taylor is a bad programmer"
expect(replies.count).to eq 2
+
+ send_command("taylor isn't a bad programmer")
+ expect(replies.last).to eq "Okay, taylor is not a bad programmer."
+ expect(replies.count).to eq 3
+
+ send_command("who is taylor")
+ expect(replies.last).to eq "taylor is "
+ end
+
+ it "Can describe everyone" do
+ send_command("taylor is a bad programmer")
+ send_command("danny is a mediocre programmer")
+
+ send_command("I don't know who anyone is")
+ expect(replies.last).to include 'taylor is a bad programmer'
+ expect(replies.last).to include 'danny is a mediocre programmer'
end
end