Skip to content

Commit

Permalink
Add shortcuts for paste and play too.
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Sep 6, 2011
1 parent 964427b commit 1432666
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/firetower/room.rb
Expand Up @@ -15,5 +15,13 @@ def to_s
def say!(message) def say!(message)
account.say!(name, message) account.say!(name, message)
end end

def paste!(message)
account.paste!(name, message)
end

def play!(message)
account.play!(name, message)
end
end end
end end
14 changes: 13 additions & 1 deletion spec/firetower_spec.rb
Expand Up @@ -71,11 +71,23 @@
mock(:account) mock(:account)
end end


it "has short cut for say" do it "has shortcut for say" do
account.should_receive(:say!).with('awesome', 'woooooot') account.should_receive(:say!).with('awesome', 'woooooot')


subject.say! 'woooooot' subject.say! 'woooooot'
end end

it "has shortcut for paste" do
account.should_receive(:paste!).with('awesome', 'woooooot')

subject.paste! 'woooooot'
end

it "has shortcut for play" do
account.should_receive(:play!).with('awesome', 'woooooot')

subject.play! 'woooooot'
end
end end


shared_examples_for "Notifier Plugins" do shared_examples_for "Notifier Plugins" do
Expand Down

0 comments on commit 1432666

Please sign in to comment.