Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Fix last broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stu Hood committed Feb 18, 2012
1 parent 844a20e commit 5e3110b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/transformation_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -227,8 +227,11 @@ def empty_ops
it "raises an argument error if the transformation requires a copy without a valid source" do it "raises an argument error if the transformation requires a copy without a valid source" do
to = mk_template 'ReplicatingShard -> (SqlShard(host1), SqlShard(host2))' to = mk_template 'ReplicatingShard -> (SqlShard(host1), SqlShard(host2))'


fulfill = lambda {|type| if type == "BlackHoleShard"; "#{type}(hostz)"; else type end}

Gizzard::Shard::INVALID_COPY_TYPES.each do |invalid_type| Gizzard::Shard::INVALID_COPY_TYPES.each do |invalid_type|
from = mk_template "ReplicatingShard -> #{invalid_type} -> SqlShard(host1)" fulfilled = fulfill.call(invalid_type)
from = mk_template "ReplicatingShard -> #{fulfilled} -> SqlShard(host1)"
lambda { Gizzard::Transformation.new(from, to) }.should raise_error(ArgumentError) lambda { Gizzard::Transformation.new(from, to) }.should raise_error(ArgumentError)
end end
end end
Expand Down

0 comments on commit 5e3110b

Please sign in to comment.