Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (66 sloc) 1.747 kb
b5c6ac8 Macario Ortega implemented Disk IO Ugens: DiskOut, DiskIn, VDiskIn
maca authored
1 require File.expand_path(File.dirname(__FILE__)) + "/helper"
2
3 require "scruby/core_ext/delegator_array"
4 require "scruby/control_name"
5 require "scruby/env"
6 require "scruby/ugens/ugen"
7 require "scruby/ugens/ugen_operations"
8 require "scruby/ugens/multi_out"
9 require "scruby/ugens/ugens"
10 require "scruby/ugens/demand"
11
12 include Scruby
13 include Ugens
14
15 class MockUgen < Ugen
16 class << self; public :new; end
17 end
18
19 describe Demand do
20 shared_examples_for 'Demand Ugen' do
21 before do
22 @prox = @splatted ? Demand.send( @method, *@ugens) : Demand.send( @method, @ugens)
23 @instance = @splatted ? @prox.source : @prox.first.source
24 end
25
26 it "should output proxies or single proxie" do
7f8079b Macario Ortega all specs on green, switched to yet cleaner maca-ruby-osc gem
maca authored
27 @splatted ? @prox.each{ |prox| prox.should be_a(OutputProxy) } : @prox.should( be_a(OutputProxy) )
b5c6ac8 Macario Ortega implemented Disk IO Ugens: DiskOut, DiskIn, VDiskIn
maca authored
28 end
29 end
30
31 shared_examples_for 'Demand with ar' do
32 before do
33 @method = :ar
34 end
35 it_should_behave_like 'Demand Ugen'
36 end
37
38 shared_examples_for 'Demand with kr' do
39 before do
40 @method = :ar
41 end
42 it_should_behave_like 'Demand Ugen'
43 end
44
45
46
47 describe 'Single channel splatted input' do
48 before do
49 @channels = 1
50 @ugens = [MockUgen.new(:audio, 1, 2)] * 4
51 @splatted = true
52 end
53
54 end
55
56 describe "Single channel array input" do
57 before do
58 @channels = 1
59 @ugens = [MockUgen.new(:audio, 1, 2)] * 4
60 @splatted = false
61 end
62
63 end
64
65 # describe "Two channel splatted input" do
66 # before do
67 # @channels = 2
68 # @splatted = false
69 # end
70 #
71 # end
72 #
73 # describe "Two channel array input" do
74 # before do
75 # @channels = 2
76 # @splatted = false
77 # end
78 #
79 # end
80
81 end
Something went wrong with that request. Please try again.