[MacRuby] #492: Need GCD Specs for Sources
#492: Need GCD Specs for Sources ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- I split these into a separate file, as they are fairly complex and I was crashing MacRuby when I tried to run them all at once. :-) -- Ticket URL: <http://www.macruby.org/trac/ticket/492> MacRuby <http://macruby.org/>
#492: Need GCD Specs for Sources ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by conradwt@…): The first example within the example group, 'Dispatch::Source', should be split into 8 different tests being that they are independent. For example, {{{ it "returns sources from queue as an instance of Source" do file = File.new("/tmp/foo") signal = 9 @q.on_add.should be_kind_of(Dispatch::Source) @q.on_or.should be_kind_of(Dispatch::Source) @q.on_process_status($$, :exit, :fork, :exec, :reap, :signal).should be_kind_of(Dispatch::Source) @q.on_timer(Time.now, 1, 0.1).should be_kind_of(Dispatch::Source) @q.on_file_status(file, :delete, :write, :extend, :attrib, :link, :rename, :revoke).should be_kind_of(Dispatch::Source) @q.on_read($stdin).should be_kind_of(Dispatch::Source) @q.on_write($stdout).should be_kind_of(Dispatch::Source) @q.on_signal(signal).should be_kind_of(Dispatch::Source) end }}} Also, I guess that you're meaning that you'll have different files for Group, Queue, and Source? -- Ticket URL: <http://www.macruby.org/trac/ticket/492#comment:1> MacRuby <http://macruby.org/>
#492: Need GCD Specs for Sources ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by ernest.prabhakar@…):
should be split into 8 different tests
Yeah, you're right. I just did this as a quick and dirty way to convince myself that this API made sense. It may actually be smarter to actually "describe" of the different event sources differently: - custom (add, or) - timer - status change (file, process) - IO (read, write) - signal
you'll have different files for Group, Queue, and Source
The long-term plan is to have a "gcd" subdirectory under spec with multiple independent files. At a guess, the modules would be: - Queue - Source - Semaphore I'm not 100% sure if Group would be separate, since it is closely tied to Queue and tested as part of Queue#async, but it probably should e -- Ticket URL: <http://www.macruby.org/trac/ticket/492#comment:2> MacRuby <http://macruby.org/>
#492: Need GCD Specs for Sources ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by ernest.prabhakar@…): * status: new => closed * resolution: => fixed Comment: Fixed in r3093 -- Ticket URL: <http://www.macruby.org/trac/ticket/492#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby