Sha256: a8c3c4e5a6f45de6b0a9125d278739dc033a9bd6b2ce2fa04c8eb0d78845f968

Contents?: true

Size: 502 Bytes

Versions: 7

Compression:

Stored size: 502 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

7 entries across 7 versions & 1 rubygems

Version Path
termit-2.13.0 spec/termit/sound_response_handler_spec.rb
termit-2.12.1 spec/termit/sound_response_handler_spec.rb
termit-2.12.0 spec/termit/sound_response_handler_spec.rb
termit-2.11.2 spec/termit/sound_response_handler_spec.rb
termit-2.11.1 spec/termit/sound_response_handler_spec.rb
termit-2.11.0 spec/termit/sound_response_handler_spec.rb
termit-2.10.2 spec/termit/sound_response_handler_spec.rb