Permalink
Browse files

Tests are back to green.

  • Loading branch information...
1 parent 38bfb91 commit 6801e50af3c2b6943d394f63cf927db0a00f67a7 Darrick Wiebe committed Apr 8, 2011
Showing with 24 additions and 20 deletions.
  1. +24 −20 spec/support/graph_runner.rb
@@ -1,4 +1,28 @@
class Rspec::GraphRunner
+ module Tg
+ def all(usage_style = :read_write, indices = true, &block)
+ tg(usage_style, indices, &block)
+ end
+
+ def tg(usage_style = :read_write, indices = true, &block)
+ return unless use_graph? 'tg'
+ describe 'tg' do
+ let(:graph) do
+ g = Pacer.tg
+ unless indices
+ g.drop_index :vertices
+ g.drop_index :edges
+ end
+ g
+ end
+ let(:graph2) { Pacer.tg }
+ instance_eval(&block)
+ end
+ end
+ end
+
+ include Tg
+
def initialize(*graphs)
@graphs = graphs.map { |s| s.to_s.downcase.split(/\s*,\s*/) }.flatten.map { |s| s.strip }.reject { |s| s == '' }
end
@@ -11,10 +35,6 @@ def inspect
end
end
- def all(usage_style = :read_write, indices = true, &block)
- tg(usage_style, indices, &block)
- end
-
def use_graph?(name)
if @graphs.empty?
true
@@ -23,22 +43,6 @@ def use_graph?(name)
end
end
- def tg(usage_style = :read_write, indices = true, &block)
- return unless use_graph? 'tg'
- describe 'tg' do
- let(:graph) do
- g = Pacer.tg
- unless indices
- g.drop_index :vertices
- g.drop_index :edges
- end
- g
- end
- let(:graph2) { Pacer.tg }
- instance_eval(&block)
- end
- end
-
protected
def for_graph(name, usage_style, indices, transactions, source_graph_1, source_graph_2, unindexed_graph, block)

0 comments on commit 6801e50

Please sign in to comment.