test/dummy/lib/redis_instance.rb
# Returns true if instance is running
Returns true if instance is running
Returns true if instance is running
def is_running?
      result = ""
      result = `ps -p #{pid} -o cmd=`.gsub("\n", "") unless pid.empty?
      running = result.split.first == "redis-server" ? true : false
      running
    end
def is_running? result = "" result = ` ps -p  #{ pid }  -o cmd= ` . gsub ( "\n" , "" ) unless pid . empty? running = result . split . first == "redis-server" ? true : false running end
Returns true if instance is running
Returns true if instance is running