Sha256: f58eb78cc5279a128323e1a2b294ba4bb30b28918c33f124dbaf73efdcacbdcf

Contents?: true

Size: 1.41 KB

Versions: 55

Compression:

Stored size: 1.41 KB

Contents

=begin
Copyright 2010, Roger Pack 
This file is part of Sensible Cinema.

    Sensible Cinema is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Sensible Cinema is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Sensible Cinema.  If not, see <http://www.gnu.org/licenses/>.
=end
require File.dirname(__FILE__) + "/common"
require_relative '../lib/muter'

describe 'manual muter' do
  # functional test
  
  3.times {
    Muter.mute!
    puts 'muted'
    sleep 1
    Muter.unmute!
    puts 'unmuted'
    sleep 1
  }
  # these rest *should* be able to pass...
  
  Muter.mute!
  Muter.mute!
  puts 'silence'
  sleep 1
  Muter.unmute!
  puts 'non silence'
  sleep 1
  Muter.unmute!
  puts 'non silence'
  sleep 1
  puts 'single takes'
  p Benchmark.realtime { 1.times{Muter.hit_volume_down_key}}
  puts 'triple takes'
  p Benchmark.realtime { 1.times{Muter.unmute!}} # 0.00023848s
  # seems actually like reasonable speed
  Muter.unmute!
end

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
sensible-cinema-0.20.1 spec/muter.spec.rb
sensible-cinema-0.20.0 spec/muter.spec.rb
sensible-cinema-0.19.7 spec/muter.spec.rb
sensible-cinema-0.19.6 spec/muter.spec.rb
sensible-cinema-0.19.5 spec/muter.spec.rb
sensible-cinema-0.19.4 spec/muter.spec.rb
sensible-cinema-0.19.3 spec/muter.spec.rb
sensible-cinema-0.19.2 spec/muter.spec.rb
sensible-cinema-0.19.1 spec/muter.spec.rb
sensible-cinema-0.19.0 spec/muter.spec.rb
sensible-cinema-0.18.4 spec/muter.spec.rb
sensible-cinema-0.18.3 spec/muter.spec.rb
sensible-cinema-0.18.2 spec/muter.spec.rb
sensible-cinema-0.18.1 spec/muter.spec.rb
sensible-cinema-0.18.0 spec/muter.spec.rb