Permalink
Browse files

add documentation for running hyper_record tests

  • Loading branch information...
1 parent 53a47d3 commit eb81b977beab4c81a4bb09fb8b91833e63adcd7d @tylerkovacs committed May 30, 2010
Showing with 54 additions and 3 deletions.
  1. +44 −0 HOW_TO_RUN_TESTS
  2. +10 −3 Rakefile
View
@@ -0,0 +1,44 @@
+The HyperRecord test suite is spread out across a number of different files
+in the test/ and spec/ directories.
+
+$ ls -l test/
+total 28
+-rw-r--r-- 1 root root 188 May 20 15:36 test_helper.rb
+-rw-r--r-- 1 root root 22281 May 30 13:56 thrift_client_test.rb
+
+$ ls -l spec/
+total 12
+drwxr-xr-x 3 root root 4096 May 20 15:36 fixtures
+drwxr-xr-x 3 root root 4096 May 30 14:08 lib
+-rw-r--r-- 1 root root 4067 May 20 15:36 spec_helper.rb
+
+The test/ directory contains unit tests (using Ruby's standard Test::Unit
+library) that exercise the Thrift client libraries only. These tests do
+not cover any functionality specific to HyperRecord.
+
+To run the Thrift client unit tests:
+$ rake
+<snip test output>
+
+Failures in the test/ suite may be caused by:
+
+1. A mismatch between the version of Thrift installed on your local machine
+ and the version of Thrift supported in this release on HyperRecord.
+2. Problems communicating with a ThriftBroker process running on the default
+ port (38080) on localhost. Note: you must be running Hypertable for
+ these tests to pass and, specifically, a ThriftBroker process must be
+ running on localhost.
+
+The spec/ directory contains rspec tests that cover HyperRecord functionality.
+Since HyperRecord extends the base ActiveRecord implementation, these tests
+can only be run if the HyperRecord gem directory has been unpacked into a
+local Rails tree. This is typically done by:
+
+$ gem install hyper_record
+$ cd vendor/gems
+$ gem unpack hyper_recrd
+$ gem uninstall hyper_record
+
+To run the HyperRecord rspec tests:
+$ rake spec
+<snip test output>
View
@@ -14,8 +14,6 @@ begin
s.description = "See README"
s.authors = ["tylerkovacs"]
end
-
- Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
@@ -40,4 +38,13 @@ Rcov::RcovTask.new do |t|
t.verbose = true
end
-task :default => :rcov
+task :noop do
+end
+
+Rake::TestTask.new(:spec => :noop) do |t|
+ t.libs << 'spec'
+ t.test_files = FileList['spec/**/*_spec.rb']
+ t.verbose = true
+end
+
+task :default => :test

0 comments on commit eb81b97

Please sign in to comment.