Top Level Namespace
Defined Under Namespace
Modules: Nestor
Constant Summary collapse
- RAILS_ENV =
"test"
Instance Method Summary collapse
-
#changed!(filename, should_sendoff = true) ⇒ Object
:nodoc:.
-
#log(message) ⇒ Object
:nodoc:.
-
#sendoff(timeout = 0.8, path = "tmp/nestor-sendoff") ⇒ Object
:nodoc:.
Instance Method Details
#changed!(filename, should_sendoff = true) ⇒ Object
:nodoc:
28 29 30 31 32 33 |
# File 'lib/nestor/mappers/rails/test/rails_test_unit.rb', line 28 def changed!(filename, should_sendoff=true) #:nodoc: return if File.directory?(filename) log "Detected change on #{filename.inspect}" @machine.changed! filename sendoff if should_sendoff end |
#log(message) ⇒ Object
:nodoc:
1 2 3 |
# File 'lib/nestor/mappers/rails/test/rails_test_unit.rb', line 1 def log() #:nodoc: @machine.log() end |
#sendoff(timeout = 0.8, path = "tmp/nestor-sendoff") ⇒ Object
:nodoc:
19 20 21 22 23 24 25 26 |
# File 'lib/nestor/mappers/rails/test/rails_test_unit.rb', line 19 def sendoff(timeout=0.8, path="tmp/nestor-sendoff") #:nodoc: Thread.start(timeout, path) do |timeout, path| log "Sendoff pending in #{timeout}s..." sleep timeout File.open(path, "w") {|io| io.write(rand.to_s)} log "Sendoff fired on #{path}" end end |