Skip to content

Commit

Permalink
Add some simple fun routines to get used to working on Betty
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzygroup committed Aug 22, 2016
1 parent 8a1af64 commit b225db1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/fun.rb
Expand Up @@ -8,6 +8,19 @@ def self.interpret(command)
}
end

if command.match(/^superman\s+vs\s+batman$/i)
responses << {
say: [true,false].sample ? "Batman" : "Superman"
}
end

if command.match(/^what\s+if\s+batman\s+does\snot\s+have\s+a?n?y?\s*kryptonite$/i)
responses << {
say: "Batman always has kryptonite"
}
end


if command.match(/^open\s(the\s)?pod\sbay\sdoor(s)?$/i)
responses << {
:say => "I'm sorry, Dave. I'm afraid I can't do that."
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions spec/fun_spec.rb
Expand Up @@ -13,5 +13,13 @@
context 'sudo make me a sandwich' do
it { responds_with say: "I think you meant to place sudo at the start of the command." }
end

context "what if batman does not have any kryptonite" do
it { responds_with say: "Batman always has kryptonite" }
end

context "what if batman does not have kryptonite" do
it { responds_with say: "Batman always has kryptonite" }
end

end

0 comments on commit b225db1

Please sign in to comment.