Skip to content
Newer
Older
100644 71 lines (55 sloc) 1.52 KB
54ff5c1 @maca refactored module structure, removed Audio module
maca authored
1 require File.expand_path(File.dirname(__FILE__)) + "/helper"
2
3
4 require "scruby/core_ext/typed_array"
5 require "scruby/node"
6 require "scruby/group"
7 require 'scruby/bus'
7f8079b @maca all specs on green, switched to yet cleaner maca-ruby-osc gem
maca authored
8
54ff5c1 @maca refactored module structure, removed Audio module
maca authored
9 require 'scruby/server'
10 require File.join( File.expand_path(File.dirname(__FILE__)), "server")
11
12
13 include Scruby
14 class Bus; end # mock
15
16 describe Group do
17 before :all do
18 end
19
20 before do
21 Node.reset!
22 Server.stub!(:all).and_return([@server])
23 end
24
25 describe 'Server interaction' do
26 before :all do
27 @server = Server.new
28 @server.boot
29 @server.send "/dumpOSC", 3
30 sleep 0.05
31 end
32
33 after :all do
34 @server.quit
35 end
36
37 before do
38 @server.flush
39 @group = Group.new @server
40 @node = Node.new @server
41 end
42
43 describe 'position' do
44 end
45
46 it "should send free all message" do
47 @group.free_all.should be_a(Group)
48 sleep 0.05
49 @server.output.should =~ %r{\[ "/g_freeAll", #{ @group.id } \]}
50 end
51
52 it "should send deepFree message" do
53 @group.deep_free.should be_a(Group)
54 sleep 0.05
55 @server.output.should =~ %r{\[ "/g_deepFree", #{ @group.id } \]}
56 end
57
58 it "should send dump tree message" do
59 @group.dump_tree.should be_a(Group)
60 sleep 0.05
61 @server.output.should =~ %r{\[ "/g_dumpTree", #{ @group.id }, 0 \]}
62 @group.dump_tree true
63 sleep 0.05
64 @server.output.should =~ %r{\[ "/g_dumpTree", #{ @group.id }, 1 \]}
65 end
66
67 it "should send dump tree message with arg"
68 it "should query_tree"
69 end
70
71 end
Something went wrong with that request. Please try again.