Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 95 lines (80 sloc) 2.453 kB
17c5761 Get rid of RSpec deprecation warnings and upgrade to latest version.
Darrick Wiebe authored
1 require "rubygems"
2 require "bundler"
3 Bundler.setup(:default, :development)
b62c653 rake rcov now works.
Darrick Wiebe authored
4 require 'rspec'
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
5 require 'pacer'
fb1082a Broke up specs and organized the files correctly for autotest.
Darrick Wiebe authored
6 require 'set'
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
7
9a267ab @pangloss Switch to simplecov
pangloss authored
8 require 'simplecov'
9 SimpleCov.start if ENV['COVERAGE']
10
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
11 Dir['./spec/support/**/*.rb'].map {|f| require f}
daa8742 Added a bunch of tests for branching.
Darrick Wiebe authored
12 Dir['./spec/tackle/*.rb'].map {|f| require f}
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
13
fb1082a Broke up specs and organized the files correctly for autotest.
Darrick Wiebe authored
14 include Pacer::Routes
15
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
16 class RSpec::Core::ExampleGroup
17 def self.run_all(reporter=nil)
18 run(reporter || NullObject.new)
19 end
20 end
21
22 def in_editor?
23 ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM')
24 end
25
50b5ebf Clean up spec_helper
Darrick Wiebe authored
26 require 'pacer-neo4j'
399c212 @pangloss Eliminate Dex from the test suite to work around #16.
pangloss authored
27 # require 'pacer-dex'
28 Pacer::DexGraph = Class.new unless defined? Pacer::DexGraph
cb6fe70 Test and debug Pacer::Transform::Group. JRuby 1.9 didn't like @curren…
Darrick Wiebe authored
29
17c5761 Get rid of RSpec deprecation warnings and upgrade to latest version.
Darrick Wiebe authored
30 Run = RSpec::GraphRunner.new ENV['GRAPHS']
a20571e I did this refactoring for orient but it will be useful for Dex as well.
Darrick Wiebe authored
31
ddd68aa Tested VertexMixin
Darrick Wiebe authored
32 def use_simple_graph_data
6604e30 Fix setup_data for simple test data.
Darrick Wiebe authored
33 let(:setup_data) { e0; e1 }
ddd68aa Tested VertexMixin
Darrick Wiebe authored
34 let(:v0) { graph.create_vertex :name => 'eliza' }
35 let(:v1) { graph.create_vertex :name => 'darrick' }
36 let(:e0) { graph.create_edge nil, v0, v1, :links }
37 let(:e1) { graph.create_edge nil, v0, v1, :relinks }
38 end
39
dbed95e Moved graph-specific helper methods into their gems and general spec …
Darrick Wiebe authored
40 def use_pacer_graphml_data(usage_style = :read_write)
ab3a510 The Base spec is looking quite good now I think.
Darrick Wiebe authored
41 if usage_style == :read_only
42 let(:setup_data) { }
43 before(:all) do
3c5409e This is looking good: 845 examples, 3 failures, 40 pending
Darrick Wiebe authored
44 graph.import 'spec/data/pacer.graphml' if graph
ab3a510 The Base spec is looking quite good now I think.
Darrick Wiebe authored
45 end
46 else
47 let(:setup_data) do
3c5409e This is looking good: 845 examples, 3 failures, 40 pending
Darrick Wiebe authored
48 graph.import 'spec/data/pacer.graphml' if graph
ab3a510 The Base spec is looking quite good now I think.
Darrick Wiebe authored
49 end
638e746 Trying to figure out the best way to test route mixins
Darrick Wiebe authored
50 end
51 let(:pangloss) { graph.v(:name => 'pangloss', :type => 'person').first }
52 let(:pacer) { graph.v(:name => 'pacer', :type => 'project').first }
53 let(:people) { graph.v(:type => 'person') }
338fc3e Added some wrapper specs
Darrick Wiebe authored
54 let(:pangloss_wrote_pacer) { pangloss.out_e(:wrote) { |e| e.in_vertex == pacer }.first }
638e746 Trying to figure out the best way to test route mixins
Darrick Wiebe authored
55 end
56
dbed95e Moved graph-specific helper methods into their gems and general spec …
Darrick Wiebe authored
57 def use_grateful_dead_data(usage_style = :read_write)
44b20ab Start testing on future filter.
Darrick Wiebe authored
58 if usage_style == :read_only
59 let(:setup_data) { }
60 before(:all) do
61 graph.import 'spec/data/grateful-dead.xml' if graph
62 end
63 else
64 let(:setup_data) do
65 graph.import 'spec/data/grateful-dead.xml' if graph
66 end
67 end
68 end
69
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
70 RSpec.configure do |c|
71 c.color_enabled = !in_editor?
72 c.filter_run :focus => true
73 c.run_all_when_everything_filtered = true
cd1e6e5 Started writing an rspec suite.
Darrick Wiebe authored
74 Pacer.hide_route_elements = true
5873e7b Refactor bulk_job into its own module.
Darrick Wiebe authored
75 Pacer.verbose = false
cd1e6e5 Started writing an rspec suite.
Darrick Wiebe authored
76 c.mock_with :rr
77
90460c5 Finished off element_mixin_spec.
Darrick Wiebe authored
78 c.alias_it_should_behave_like_to :it_uses, '-'
f4822f0 Test both graph engines and a bunch of neo-related bugfixes now that …
Darrick Wiebe authored
79
dbed95e Moved graph-specific helper methods into their gems and general spec …
Darrick Wiebe authored
80 puts "Using JRuby #{ JRUBY_VERSION } in #{ RUBY_VERSION } mode."
81 puts Run.inspect
82
9dab092 Created a spec helper. This is for the prerelease rspec 2.0:
Darrick Wiebe authored
83 # Not sure what this does: ...
84 # c.filter_run_excluding :ruby => lambda {|version|
85 # case version.to_s
86 # when "!jruby"
87 # RUBY_ENGINE != "jruby"
88 # when /^> (.*)/
89 # !(RUBY_VERSION.to_s > $1)
90 # else
91 # !(RUBY_VERSION.to_s =~ /^#{version.to_s}/)
92 # end
93 # }
94 end
Something went wrong with that request. Please try again.