Permalink
Browse files

add failing specs for setup_shards

  • Loading branch information...
freels committed Aug 31, 2010
1 parent 5a7bd78 commit 6c15e72d8ced999f40b2b142d42f6e6e5f85f118
Showing with 509 additions and 1 deletion.
  1. +10 −1 Rakefile
  2. +82 −0 spec/shard_template_spec.rb
  3. +7 −0 spec/spec.opts
  4. +24 −0 spec/spec_helper.rb
  5. +386 −0 spec/transformation_spec.rb
View
@@ -1,5 +1,6 @@
require 'rubygems'
require 'rake'
+require 'spec/rake/spectask'
begin
require 'jeweler'
@@ -23,6 +24,14 @@ Rake::TestTask.new(:test) do |test|
test.verbose = true
end
+Spec::Rake::SpecTask.new(:spec) do |t|
+ spec_opts = File.expand_path('spec/spec.opts')
+ if File.exist? spec_opts
+ t.spec_opts = ['--options', "\"#{spec_opts}\""]
+ end
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
@@ -37,7 +46,7 @@ rescue LoadError
end
task :test do
- puts
+ puts
puts "=" * 79
puts "You might want to read the README before running tests."
puts "=" * 79
@@ -0,0 +1,82 @@
+require File.expand_path('../spec_helper', __FILE__)
+
+describe Gizzard::ShardTemplate do
+ describe "concrete?" do
+ end
+
+ describe "valid?" do
+ end
+
+ describe "java_type" do
+ end
+
+ describe "identifier" do
+ end
+
+ describe "host" do
+ end
+
+ describe "children" do
+ end
+
+ describe "descendant_identifiers" do
+ end
+
+ describe "copy_sources" do
+ end
+
+ describe "copy_source" do
+ end
+
+ describe "materialization methods" do
+ describe "to_shard_id" do
+ end
+
+ describe "to_shard_info" do
+ end
+ end
+
+ describe "comparison methods" do
+ describe "similar?" do
+ end
+
+ describe "<=>" do
+ end
+
+ describe "eql?" do
+ end
+
+ describe "hash" do
+ end
+ end
+
+ describe "config methods" do
+ describe "to_config" do
+ end
+ end
+
+ describe "nameserver inspection class methods" do
+ describe "existing_template_map" do
+ end
+
+ describe "build_tree" do
+ end
+
+ describe "collect_links" do
+ end
+
+ describe "collect_shards" do
+ end
+ end
+
+ describe "config class methods" do
+ describe "from_config" do
+ end
+
+ describe "parse_link_struct" do
+ end
+
+ describe "parse_shard_definition" do
+ end
+ end
+end
View
@@ -0,0 +1,7 @@
+--colour
+--format progress
+--loadby mtime
+--reverse
+--timeout 20
+--diff
+--backtrace
View
@@ -0,0 +1,24 @@
+$:.unshift File.expand_path('../../lib', __FILE__)
+
+require 'rubygems'
+
+# testing requires
+require 'spec'
+require 'rr'
+
+Spec::Runner.configure do |config|
+ config.mock_with :rr
+end
+
+# source requires
+require 'gizzard'
+require 'gizzard/nameserver'
+require 'gizzard/transformation'
+require 'gizzard/migrator'
+require 'gizzard/shard_template'
+
+
+def make_shard_template(config)
+ config = YAML.load(config) if config.is_a? String
+ Gizzard::ShardTemplate.from_config(config)
+end
Oops, something went wrong.

0 comments on commit 6c15e72

Please sign in to comment.