Sha256: 4863bd78e5ef26ca7e9fabbd5fdfb161a5510a2ac92a2e22cb198a49215f33dc

Contents?: true

Size: 738 Bytes

Versions: 3

Compression:

Stored size: 738 Bytes

Contents

# frozen_string_literal: true

if ENV['COVERAGE']
  require 'simplecov'

  SimpleCov.start do
    enable_coverage :branch
    add_filter %r{^/test/}
  end
end

$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "redgraph"

require "minitest/autorun"
require "pry"

unless $REDIS_URL = ENV['TEST_REDIS_URL']
  puts "To run the tests you need to define the TEST_REDIS_URL environment variable"
  exit(1)
end

module TestHelpers
  private

  def quick_add_node(label:, properties:)
    @graph.add_node(Redgraph::Node.new(label: label, properties: properties))
  end

  def quick_add_edge(type:, src:, dest:, properties:)
    @graph.add_edge(Redgraph::Edge.new(type: type, src: src, dest: dest, properties: properties))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
redgraph-0.2.1 test/test_helper.rb
redgraph-0.2.0 test/test_helper.rb
redgraph-0.1.4 test/test_helper.rb