mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
24 lines
412 B
Ruby
24 lines
412 B
Ruby
require 'spec_helper'
|
|
|
|
describe MPDClient do
|
|
|
|
subject { MPDClient }
|
|
|
|
before do
|
|
subject.connect!
|
|
end
|
|
|
|
describe "#listen" do
|
|
it "exposes `Connection#on` for easy event listening" do
|
|
subject.conn.should_receive(:on).exactly(3).times
|
|
|
|
subject.listen do
|
|
on(:first) { "something" }
|
|
on(:second) { "something" }
|
|
on(:third) { "something" }
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|