Sha256: 14f52bd7ab40dbfce4619635881e8ce1f97b75f2cc7988aeca3b468f94f36854
Contents?: true
Size: 753 Bytes
Versions: 22
Compression:
Stored size: 753 Bytes
Contents
require "spec_helper" describe Lita::Source do it "has a user" do subject = described_class.new(user: "Carl") expect(subject.user).to eq("Carl") end it "has a room" do subject = described_class.new(room: "#litabot") expect(subject.room).to eq("#litabot") end it "has a private message flag" do subject = described_class.new(user: "Carl", private_message: true) expect(subject).to be_a_private_message end it "can be manually marked as private" do subject = described_class.new(user: "Carl", room: "#litabot") subject.private_message! expect(subject).to be_a_private_message end it "requires either a user or a room" do expect { described_class.new }.to raise_error(ArgumentError) end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
lita-3.0.1 | spec/lita/source_spec.rb |
lita-3.0.0 | spec/lita/source_spec.rb |