Sha256: 651a15167471c9b301e77ea8fdedc55bdbb60638c27d5c99c6a87827766a2299

Contents?: true

Size: 501 Bytes

Versions: 4

Compression:

Stored size: 501 Bytes

Contents

#encoding: UTF-8
require 'spec_helper'

describe Termit::SoundResponseHandler do
  describe "call method" do
    subject { Termit::SoundResponseHandler.new('tralala') }
    let(:location) { "#{File.expand_path('~')}/.termit" }

    it "saves and plays the sound file the sound file" do
      File.should_receive(:open).with("#{location}/sound_response.mpeg", "wb")
      Object.any_instance.should_receive(:system).with("mpg123 -q #{location}/sound_response.mpeg")
      subject.call
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
termit-2.10.1 spec/termit/sound_response_handler_spec.rb
termit-2.10.0 spec/termit/sound_response_handler_spec.rb
termit-2.0.9 spec/termit/sound_response_handler_spec.rb
termit-2.0.8 spec/termit/sound_response_handler_spec.rb