Sha256: e1e5c91f44166ba8e4e0f64fd5c36e1fc7acf825e06caf51b7466f7f154e315b

Contents?: true

Size: 691 Bytes

Versions: 30

Compression:

Stored size: 691 Bytes

Contents

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

30 entries across 30 versions & 1 rubygems

Version Path
sensible-cinema-0.17.0 spec/muter.spec.rb
sensible-cinema-0.16.7 spec/muter.spec.rb
sensible-cinema-0.16.5 spec/muter.spec.rb
sensible-cinema-0.16.3 spec/muter.spec.rb
sensible-cinema-0.16.2 spec/muter.spec.rb
sensible-cinema-0.16.1 spec/muter.spec.rb
sensible-cinema-0.15.0 spec/muter.spec.rb
sensible-cinema-0.14.6 spec/muter.spec.rb
sensible-cinema-0.14.5 spec/muter.spec.rb
sensible-cinema-0.14.4 spec/muter.spec.rb
sensible-cinema-0.14.3 spec/muter.spec.rb
sensible-cinema-0.14.1 spec/muter.spec.rb
sensible-cinema-0.13.1 spec/muter.spec.rb
sensible-cinema-0.13.0 spec/muter.spec.rb
sensible-cinema-0.12.0 spec/muter.spec.rb
sensible-cinema-0.11.0 spec/muter.spec.rb
sensible-cinema-0.10.2 spec/muter.spec.rb
sensible-cinema-0.10.1 spec/muter.spec.rb
sensible-cinema-0.9.7 spec/muter.spec.rb
sensible-cinema-0.9.4 spec/muter.spec.rb