tarantula 0.0.8.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. data/README.rdoc +80 -51
  2. data/Rakefile +33 -44
  3. data/VERSION.yml +4 -0
  4. data/examples/example_helper.rb +50 -0
  5. data/{test/relevance/core_extensions/ellipsize_test.rb → examples/relevance/core_extensions/ellipsize_example.rb} +1 -1
  6. data/{test/relevance/core_extensions/file_test.rb → examples/relevance/core_extensions/file_example.rb} +1 -1
  7. data/{test/relevance/core_extensions/response_test.rb → examples/relevance/core_extensions/response_example.rb} +5 -5
  8. data/{test/relevance/core_extensions/test_case_test.rb → examples/relevance/core_extensions/test_case_example.rb} +3 -3
  9. data/{test/relevance/tarantula/attack_form_submission_test.rb → examples/relevance/tarantula/attack_form_submission_example.rb} +1 -1
  10. data/{test/relevance/tarantula/attack_handler_test.rb → examples/relevance/tarantula/attack_handler_example.rb} +1 -1
  11. data/{test/relevance/tarantula/crawler_test.rb → examples/relevance/tarantula/crawler_example.rb} +3 -3
  12. data/{test/relevance/tarantula/form_test.rb → examples/relevance/tarantula/form_example.rb} +1 -1
  13. data/{test/relevance/tarantula/form_submission_test.rb → examples/relevance/tarantula/form_submission_example.rb} +1 -1
  14. data/{test/relevance/tarantula/html_document_handler_test.rb → examples/relevance/tarantula/html_document_handler_example.rb} +1 -1
  15. data/{test/relevance/tarantula/html_report_helper_test.rb → examples/relevance/tarantula/html_report_helper_example.rb} +1 -1
  16. data/{test/relevance/tarantula/html_reporter_test.rb → examples/relevance/tarantula/html_reporter_example.rb} +3 -3
  17. data/{test/relevance/tarantula/invalid_html_handler_test.rb → examples/relevance/tarantula/invalid_html_handler_example.rb} +1 -1
  18. data/{test/relevance/tarantula/io_reporter_test.rb → examples/relevance/tarantula/io_reporter_example.rb} +2 -2
  19. data/{test/relevance/tarantula/link_test.rb → examples/relevance/tarantula/link_example.rb} +21 -15
  20. data/{test/relevance/tarantula/log_grabber_test.rb → examples/relevance/tarantula/log_grabber_example.rb} +1 -1
  21. data/{test/relevance/tarantula/rails_init_test.rb → examples/relevance/tarantula/rails_init_example.rb} +3 -3
  22. data/{test/relevance/tarantula/rails_integration_proxy_test.rb → examples/relevance/tarantula/rails_integration_proxy_example.rb} +6 -12
  23. data/{test/relevance/tarantula/result_test.rb → examples/relevance/tarantula/result_example.rb} +2 -2
  24. data/{test/relevance/tarantula/tidy_handler_test.rb → examples/relevance/tarantula/tidy_handler_example.rb} +1 -1
  25. data/{test/relevance/tarantula/transform_test.rb → examples/relevance/tarantula/transform_example.rb} +2 -3
  26. data/{test/relevance/tarantula_test.rb → examples/relevance/tarantula_example.rb} +3 -3
  27. data/laf/v2/detail.html +23 -5
  28. data/laf/v2/index.html +1 -1
  29. data/laf/v2/stylesheets/tarantula.v2.css +77 -5
  30. data/lib/relevance/core_extensions/metaclass.rb +78 -0
  31. data/lib/relevance/tarantula.rb +1 -4
  32. data/lib/relevance/tarantula/link.rb +1 -1
  33. data/lib/relevance/tarantula/rails_integration_proxy.rb +1 -3
  34. data/template/tarantula_test.rb +12 -2
  35. metadata +54 -190
  36. data/init.rb +0 -1
  37. data/install.rb +0 -1
  38. data/manifest.txt +0 -102
  39. data/rails/init.rb +0 -4
  40. data/tarantula.gemspec +0 -56
  41. data/test/test_helper.rb +0 -34
  42. data/uninstall.rb +0 -1
  43. data/vendor/xss-shield/MIT-LICENSE +0 -20
  44. data/vendor/xss-shield/README +0 -76
  45. data/vendor/xss-shield/init.rb +0 -16
  46. data/vendor/xss-shield/lib/xss_shield.rb +0 -6
  47. data/vendor/xss-shield/lib/xss_shield/erb_hacks.rb +0 -111
  48. data/vendor/xss-shield/lib/xss_shield/haml_hacks.rb +0 -42
  49. data/vendor/xss-shield/lib/xss_shield/safe_string.rb +0 -47
  50. data/vendor/xss-shield/lib/xss_shield/secure_helpers.rb +0 -40
  51. data/vendor/xss-shield/test/test_actionview_integration.rb +0 -40
  52. data/vendor/xss-shield/test/test_erb.rb +0 -44
  53. data/vendor/xss-shield/test/test_haml.rb +0 -43
  54. data/vendor/xss-shield/test/test_helpers.rb +0 -25
  55. data/vendor/xss-shield/test/test_safe_string.rb +0 -55
@@ -6,33 +6,86 @@ Tarantula is a big fuzzy spider. It crawls your Rails application, fuzzing data
6
6
 
7
7
  == Usage
8
8
 
9
- #!sh
10
- rake tarantula:setup
9
+ === Installation
10
+
11
+ The latest and greatest version is always available on GitHub. (See the rakefile for dependencies, or
12
+ just let Rubygems handle it.)
13
+
14
+ gem install relevance-tarantula --source http://gems.github.com
15
+
16
+ You can also grab it from RubyForge, where we will push stable releases but may not be as bleeding edge
17
+ as the GitHub gem.
18
+
19
+ gem install tarantula
20
+
21
+ === Project Setup
22
+
23
+ To set up Tarantula into your application, add the following line into either config/environment.rb or
24
+ config/environments/test.rb (preferred). This assumes that you have Rails 2.1 or higher installed.
11
25
 
12
- Creates a Rails integration test that looks like this, filling in your own auth params. You will probably want to include all fixtures.
26
+ config.gem 'relevance-tarantula', :source => "http://gems.github.com", :lib => 'relevance/tarantula'
27
+
28
+ Since Rails doesn't (yet) support automatically loading rake tasks that live inside gems, you will need
29
+ to update your Rakefile to load Tarantula's rake tasks. The simplest approach is to start by vendoring
30
+ Tarantula into your Rails app.
31
+
32
+ mkdir -p vendor/gems
33
+ cd vendor/gems
34
+ gem unpack relevance-tarantula
35
+
36
+ You can then add the following line into your Rakefile, substituting the proper version of
37
+ relevance-tarantula in the path.
13
38
 
14
- require 'relevance/tarantula'
39
+ load File.join(RAILS_ROOT, "vendor/gems/relevance-tarantula-0.0.8.1/tasks/tarantula_tasks.rake")
40
+
41
+ === Crawling Your App
42
+
43
+ Use the included rake task to create a Rails integration test that will allow Tarantula to crawl your
44
+ app.
15
45
 
16
- # in your test
17
- def test_with_login
18
- post '/sessions/create', :password => 'your-pass'
19
- follow_redirect!
46
+ #!sh
47
+ rake tarantula:setup
48
+
49
+ Take a moment to familiarize yourself with the generated test. If parts of your application require
50
+ login, update the test to make sure Tarantula can access those parts of your app.
51
+
52
+ require "relevance/tarantula"
53
+
54
+ class TarantulaTest < ActionController::IntegrationTest
55
+ # Load enough test data to ensure that there's a link to every page in your
56
+ # application. Doing so allows Tarantula to follow those links and crawl
57
+ # every page. For many applications, you can load a decent data set by
58
+ # loading all fixtures.
59
+ fixtures :all
60
+
61
+ def test_tarantula
62
+ # If your application requires users to log in before accessing certain
63
+ # pages, uncomment the lines below and update them to allow this test to
64
+ # log in to your application. Doing so allows Tarantula to crawl the
65
+ # pages that are only accessible to logged-in users.
66
+ #
67
+ # post '/session', :login => 'quentin', :password => 'monkey'
68
+ # follow_redirect!
69
+
20
70
  tarantula_crawl(self)
71
+ end
21
72
  end
22
73
 
23
- If you want to set custom options, you can get access to the crawler and set properties before running it. For example, this would turn on HTMLTidy.
74
+ If you want to set custom options, you can get access to the crawler and set properties before running
75
+ it. For example, this would turn on HTMLTidy.
76
+
77
+ def test_tarantula
78
+ post '/session', :login => 'kilgore', :password => 'trout'
79
+ assert_response :redirect
80
+ assert_redirected_to '/'
81
+ follow_redirect!
24
82
 
25
- def test_with_login
26
- post '/sessions/create', :password => 'your-pass'
27
- assert_response :redirect
28
- assert_redirected_to '/'
29
- follow_redirect!
30
- t = tarantula_crawler(self)
31
- t.handlers << Relevance::Tarantula::TidyHandler.new
32
- t.crawl '/'
83
+ t = tarantula_crawler(self)
84
+ t.handlers << Relevance::Tarantula::TidyHandler.new
85
+ t.crawl '/'
33
86
  end
34
87
 
35
- Assuming your project is at /work/project/:
88
+ Now it's time to turn Tarantula loose on your app. Assuming your project is at /work/project/:
36
89
 
37
90
  #!sh
38
91
  cd /work/project
@@ -40,14 +93,15 @@ Assuming your project is at /work/project/:
40
93
 
41
94
  == Verbose Mode
42
95
 
43
- If you run the test you will get a report in tmp/tarantula. You can also set VERBOSE=true to see more detail as the test runs.
96
+ If you run the test using the steps shown above, Tarantula will produce a report in tmp/tarantula. You
97
+ can also set VERBOSE=true to see more detail as the test runs.
44
98
 
45
- For more options see the test suite.
99
+ For more options, please see the test suite.
46
100
 
47
101
  == Allowed Errors
48
102
 
49
- If, for example, a 404 is an appropriate response for some URLs, you can
50
- tell Tarantula to allow 404s for URLs matching a regexp:
103
+ If, for example, a 404 is an appropriate response for some URLs, you can tell Tarantula to allow 404s
104
+ for URLs matching a given regex:
51
105
 
52
106
  t = tarantula_crawler(self)
53
107
  t.allow_404_for %r{/users/\d+/}
@@ -76,38 +130,13 @@ You can specify the attack strings that Tarantula throws at your application.
76
130
  t.crawl "/posts"
77
131
  end
78
132
 
79
- This example adds custom attacks for both SQL injection and XSS. It also tells tarantula to crawl the app 2 times. This
80
- is important for XSS attacks because the results won't appear until the second time tarantula performs the crawl.
81
-
82
- == Install
83
-
84
- See the rakefile for dependencies, or just let Rubygems handle it.
85
-
86
- The latest and greatest gem will always be available from Github:
87
-
88
- gem install relevance-tarantula --source http://gems.github.com
89
-
90
- To setup tarantula in your application add the following line into either config/environment.rb or config/environments/test.rb (preferred).
91
- This assumes that you have Rails 2.1 or higher installed.
92
-
93
- config.gem 'relevance-tarantula', :source => "http://gems.github.com", :lib => 'relevance/tarantula'
94
-
95
- Since rails doesn't (yet) support loading rake tasks that live inside gems you will need to update your Rakefile. This assumes that you have vendored tarantula. Simply run
96
-
97
- cd vendor/gems
98
- gem unpack relevance-tarantula
99
-
100
- You can then add the following line into your Rakefile, substituting the proper version of relevance-tarantula in the path.
101
-
102
- load File.join(RAILS_ROOT, "vendor/gems/relevance-tarantula-0.0.8.1/tasks/tarantula_tasks.rake")
103
-
104
- You can also grab it from Rubyforge, where we will push stable releases but may not be as bleeding edge as the Github gem.
105
-
106
- gem install tarantula
133
+ This example adds custom attacks for both SQL injection and XSS. It also tells Tarantula to crawl the
134
+ app 2 times. This is important for XSS attacks because the results won't appear until the second time
135
+ Tarantula performs the crawl.
107
136
 
108
137
  == Bugs/Requests
109
138
 
110
- Please submit your bug reports, patches or feature requests at Lighthouse:
139
+ Please submit your bug reports, patches, or feature requests at Lighthouse:
111
140
 
112
141
  http://relevance.lighthouseapp.com/projects/17868-tarantula/overview
113
142
 
data/Rakefile CHANGED
@@ -1,27 +1,30 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'rake/rdoctask'
4
+ require 'rcov/rcovtask'
4
5
  require 'rubygems'
5
-
6
- gem 'echoe', '~> 3.0.1'
7
- require 'echoe'
6
+ gem "spicycode-micronaut", ">= 0.2.0"
7
+ require 'micronaut'
8
+ require 'micronaut/rake_task'
8
9
  require 'lib/relevance/tarantula.rb'
9
10
 
10
- echoe = Echoe.new('tarantula') do |p|
11
- p.rubyforge_name = 'thinkrelevance'
12
- p.author = ["Relevance"]
13
- p.email = 'opensource@thinkrelevance.com'
14
- p.version = Relevance::Tarantula::VERSION
15
- p.summary = "A big hairy fuzzy spider that crawls your site, wreaking havoc"
16
- p.description = "A big hairy fuzzy spider that crawls your site, wreaking havoc"
17
- p.url = "http://github.com/relevance/tarantula"
18
- p.rdoc_pattern = /^(lib|bin)|txt|rdoc|CHANGELOG|MIT-LICENSE$/
19
- rdoc_template = `allison --path`.strip << ".rb"
20
- p.rdoc_template = rdoc_template
21
- p.test_pattern = 'test/**/*_test.rb'
22
- p.manifest_name = 'manifest.txt'
23
- p.dependencies = ['htmlentities', 'hpricot', 'facets >=2.4.3', 'actionpack', 'activesupport']
24
- p.development_dependencies = ['ruby-debug', 'test-spec', 'mocha']
11
+ begin
12
+ require 'jeweler'
13
+ files = ["CHANGELOG", "MIT-LICENSE", "Rakefile", "README.rdoc", "VERSION.yml"]
14
+ files << Dir["examples/**/*", "laf/**/*", "lib/**/*", "tasks/**/*", "template/**/*"]
15
+
16
+ Jeweler::Tasks.new do |s|
17
+ s.name = "tarantula"
18
+ s.summary = "A big hairy fuzzy spider that crawls your site, wreaking havoc"
19
+ s.description = "A big hairy fuzzy spider that crawls your site, wreaking havoc"
20
+ s.homepage = "http://github.com/relevance/tarantula"
21
+ s.email = "opensource@thinkrelevance.com"
22
+ s.authors = ["Relevance, Inc."]
23
+ s.require_paths = ["lib"]
24
+ s.files = files.flatten
25
+ end
26
+ rescue LoadError
27
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
25
28
  end
26
29
 
27
30
  desc 'Generate documentation for the tarantula plugin.'
@@ -33,32 +36,18 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
33
36
  rdoc.rdoc_files.include('lib/**/*.rb')
34
37
  end
35
38
 
36
- begin
37
- require 'rcov'
38
- require "rcov/rcovtask"
39
-
40
- namespace :coverage do
41
- rcov_output = ENV["CC_BUILD_ARTIFACTS"] || 'tmp/coverage'
42
- rcov_exclusions = %w{ /Library/Ruby/* }.join(',')
43
-
44
- desc "Delete aggregate coverage data."
45
- task(:clean) { rm_f "rcov_tmp" }
46
-
47
- Rcov::RcovTask.new(:unit => :clean) do |t|
48
- t.test_files = FileList['test/**/*_test.rb']
49
- t.rcov_opts = ["--sort coverage", "--aggregate 'rcov_tmp'", "--html", "--rails", "--exclude '#{rcov_exclusions}'"]
50
- t.output_dir = rcov_output + '/unit'
51
- end
39
+ desc "Run all micronaut examples"
40
+ Micronaut::RakeTask.new :examples do |t|
41
+ t.pattern = "examples/**/*_example.rb"
42
+ end
52
43
 
53
- desc "Generate and open coverage report"
54
- task(:all => [:unit]) do
55
- system("open #{rcov_output}/unit/index.html") if PLATFORM['darwin']
56
- end
57
- end
58
- rescue LoadError
59
- if RUBY_PLATFORM =~ /java/
60
- puts 'running in jruby - rcov tasks not available'
61
- else
62
- puts 'sudo gem install rcov # if you want the rcov tasks'
44
+ namespace :examples do
45
+ desc "Run all micronaut examples using rcov"
46
+ Micronaut::RakeTask.new :coverage do |t|
47
+ t.pattern = "examples/**/*_example.rb"
48
+ t.rcov = true
49
+ t.rcov_opts = %[--exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage --no-validator-links]
63
50
  end
64
51
  end
52
+
53
+ task :default => "examples"
@@ -0,0 +1,4 @@
1
+ ---
2
+ :patch: 4
3
+ :major: 0
4
+ :minor: 1
@@ -0,0 +1,50 @@
1
+ lib_path = File.expand_path(File.dirname(__FILE__) + "/../lib")
2
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
3
+
4
+ require 'rubygems'
5
+ gem "spicycode-micronaut", ">= 0.2.0"
6
+ gem "log_buddy"
7
+ gem "mocha"
8
+ gem 'ruby-debug'
9
+ gem 'test-spec'
10
+ gem 'actionpack'
11
+ gem 'activerecord'
12
+ gem 'activesupport'
13
+
14
+ require 'ostruct'
15
+ require 'ruby-debug'
16
+ require 'activerecord'
17
+ require 'relevance/tarantula'
18
+ require 'micronaut'
19
+ require 'mocha'
20
+
21
+ # needed for html-scanner, grr
22
+ require 'active_support'
23
+ require 'action_controller'
24
+
25
+ def test_output_dir
26
+ File.join(File.dirname(__FILE__), "..", "tmp", "test_output")
27
+ end
28
+
29
+ # TODO change puts/print to use a single method for logging, which will then make the stubbing cleaner
30
+ def stub_puts_and_print(obj)
31
+ obj.stubs(:puts)
32
+ obj.stubs(:print)
33
+ end
34
+
35
+ def not_in_editor?
36
+ ['TM_MODE', 'EMACS', 'VIM'].all? { |k| !ENV.has_key?(k) }
37
+ end
38
+
39
+ def in_runcoderun?
40
+ ENV["RUN_CODE_RUN"]
41
+ end
42
+
43
+ Micronaut.configure do |c|
44
+ c.formatter = :documentation if in_runcoderun?
45
+ c.alias_example_to :fit, :focused => true
46
+ c.alias_example_to :xit, :disabled => true
47
+ c.mock_with :mocha
48
+ c.color_enabled = not_in_editor?
49
+ c.filter_run :focused => true
50
+ end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "../..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "../..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::CoreExtensions::Object#ellipsize" do
4
4
  it "converts nil to empty string" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "../..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "../..", "example_helper.rb")
2
2
  require 'relevance/core_extensions/file'
3
3
 
4
4
  describe "Relevance::CoreExtensions::File#extension" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "../..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "../..", "example_helper.rb")
2
2
  require 'relevance/core_extensions/file'
3
3
 
4
4
  describe "Relevance::CoreExtensions::Response#html?" do
@@ -9,21 +9,21 @@ describe "Relevance::CoreExtensions::Response#html?" do
9
9
 
10
10
  it "should be html if the content-type is 'text/html'" do
11
11
  @response.content_type = "text/html"
12
- @response.should.be.html
12
+ @response.should be_html
13
13
  @response.content_type = "text/html;charset=iso-8859-2"
14
- @response.should.be.html
14
+ @response.should be_html
15
15
  end
16
16
 
17
17
  it "should not be html if the content-type isn't an html type" do
18
18
  @response.content_type = "text/plain"
19
- @response.should.not.be.html
19
+ @response.should_not be_html
20
20
  end
21
21
 
22
22
  # better ideas welcome, but be careful not to
23
23
  # castrate tarantula for proxies that don't set the content-type
24
24
  it "should pretend we have html if the content-type is nil" do
25
25
  @response.content_type = nil
26
- @response.should.be.html
26
+ @response.should be_html
27
27
  end
28
28
 
29
29
  end
@@ -1,14 +1,14 @@
1
- require File.join(File.dirname(__FILE__), "../..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "../..", "example_helper.rb")
2
2
  require 'relevance/core_extensions/test_case'
3
3
 
4
4
  describe "TestCase extensions" do
5
- it "can create the crawler" do
5
+ pending "can create the crawler" do
6
6
  Relevance::Tarantula::RailsIntegrationProxy.stubs(:rails_root).returns("STUB_RAILS_ROOT")
7
7
  Relevance::Tarantula::Crawler.any_instance.stubs(:rails_root).returns("STUB_RAILS_ROOT")
8
8
  tarantula_crawler(stub_everything)
9
9
  end
10
10
 
11
- it "can crawl" do
11
+ pending "can crawl" do
12
12
  (crawler = mock).expects(:crawl).with("/foo")
13
13
  expects(:tarantula_crawler).returns(crawler)
14
14
  tarantula_crawl(:integration_test_stub, :url => "/foo")
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::AttackFormSubmission" do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::AttackHandler" do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe 'Relevance::Tarantula::Crawler#transform_url' do
4
4
  before {@crawler = Relevance::Tarantula::Crawler.new}
@@ -67,7 +67,7 @@ describe 'Relevance::Tarantula::Crawler#crawl' do
67
67
  crawler = Relevance::Tarantula::Crawler.new
68
68
  crawler.expects(:do_crawl).raises(RuntimeError)
69
69
  crawler.expects(:report_results)
70
- lambda {crawler.crawl('/')}.should.raise(RuntimeError)
70
+ lambda {crawler.crawl('/')}.should raise_error(RuntimeError)
71
71
  end
72
72
  end
73
73
 
@@ -291,6 +291,6 @@ describe "allow_nnn_for" do
291
291
 
292
292
  it "chains up to super for method_missing" do
293
293
  crawler = Relevance::Tarantula::Crawler.new
294
- lambda{crawler.foo}.should.raise(NoMethodError)
294
+ lambda{crawler.foo}.should raise_error(NoMethodError)
295
295
  end
296
296
  end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::Form large example" do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::FormSubmission" do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::HtmlDocumentHandler" do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  module HtmlReportHelperSpec
4
4
  # Is there an idiom for this?
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb")
1
+ require File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb")
2
2
 
3
3
  describe "Relevance::Tarantula::HtmlReporter file output" do
4
4
 
@@ -55,7 +55,7 @@ blah blah blah
55
55
  stub_puts_and_print(reporter)
56
56
  (@success_results + @fail_results).each {|r| reporter.report(r)}
57
57
  reporter.finish_report(@test_name)
58
- File.should.exist @index
58
+ File.exist?(@index).should be_true
59
59
  end
60
60
 
61
61
  it "creates a final report with links to detailed reports in subdirs" do
@@ -76,7 +76,7 @@ blah blah blah
76
76
  stub_puts_and_print(reporter)
77
77
  (@success_results + @fail_results).each {|r| reporter.report(r)}
78
78
  reporter.finish_report(@test_name)
79
- File.should.exist @detail
79
+ File.exist?(@detail).should be_true
80
80
  end
81
81
 
82
82
  end