Sha256: 78d80b7b867899852e9e309fbb74f5587d52f7501598081e04558535ea4d7118

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 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.mp3", "wb")
      Object.any_instance.should_receive(:system).with("mpg123 -q #{location}/sound_response.mp3 > /dev/null 2> /dev/null")
      subject.call
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
termit-3.1.1 spec/termit/sound_response_handler_spec.rb
termit-3.1.0 spec/termit/sound_response_handler_spec.rb