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.9.3 spec/muter.spec.rb
sensible-cinema-0.7.7 spec/muter.spec.rb
sensible-cinema-0.7.5 spec/muter.spec.rb
sensible-cinema-0.7.4 spec/muter.spec.rb
sensible-cinema-0.7.3 spec/muter.spec.rb
sensible-cinema-0.7.2 spec/muter.spec.rb
sensible-cinema-0.7.1 spec/muter.spec.rb
sensible-cinema-0.7.0 spec/spec.muter.rb
sensible-cinema-0.6.1 spec/spec.muter.rb
sensible-cinema-0.6.0 spec/spec.muter.rb