spec/memetron/matcher_spec.rb in memetron-0.1.2 vs spec/memetron/matcher_spec.rb in memetron-0.1.3
- old
+ new
@@ -202,6 +202,36 @@
it "is parsed" do
subject.parse(:sean_bean, "Prepare yourself, the memes are coming").should == ["memes"]
end
end
+
+ context "orly?" do
+ it "is detected" do
+ subject.match("Another test orly?").should == :orly
+ end
+
+ it "is parsed" do
+ subject.parse(:orly, "Another test orly?").should == ["Another test"]
+ end
+ end
+
+ context "All the things" do
+ it "is detected" do
+ subject.match("Test all the things").should == :all
+ end
+
+ it "is parsed" do
+ subject.parse(:all, "Test all the things").should == ["Test"]
+ end
+ end
+
+ context "Obama face" do
+ it "is detected" do
+ subject.match("New meme not bad").should == :obama
+ end
+
+ it "is parsed" do
+ subject.parse(:obama, "New meme not bad").should == ["New meme"]
+ end
+ end
end