Sha256: d315a0e9b855deeb8c781e6dc5507cc8fa40d961e97ac06aa83b0b5cc0f38b14

Contents?: true

Size: 500 Bytes

Versions: 3

Compression:

Stored size: 500 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")
      subject.call
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
termit-3.0.2 spec/termit/sound_response_handler_spec.rb
termit-3.0.1 spec/termit/sound_response_handler_spec.rb
termit-3.0.0 spec/termit/sound_response_handler_spec.rb