fixed specs for new topology configuration

This commit is contained in:
Colin Surprenant 2013-05-14 22:00:10 -04:00
parent 756965fa6c
commit 2f8d71b829
1 changed files with 23 additions and 3 deletions

View File

@ -32,9 +32,29 @@ describe RedStorm::SimpleTopology do
Topology1.topology_name.should == "topology1"
end
it "should set topology class in Configuration object" do
class UnconfiguredTopology < RedStorm::SimpleTopology; end
RedStorm::Configuration.topology_class.name.should == "UnconfiguredTopology"
it "should set topology class in Configuration object upon configure statement" do
RedStorm::Configuration.topology_class = nil
class Topology1 < RedStorm::SimpleTopology
configure {}
end
RedStorm::Configuration.topology_class.name.should == "Topology1"
end
it "should set topology class in Configuration object upon spout statement" do
RedStorm::Configuration.topology_class = nil
class Topology1 < RedStorm::SimpleTopology
spout SpoutClass1
end
RedStorm::Configuration.topology_class.name.should == "Topology1"
end
it "should set topology class in Configuration object upon bolt statement" do
RedStorm::Configuration.topology_class = nil
class Topology1 < RedStorm::SimpleTopology
bolt BoltClass1 do
end
end
RedStorm::Configuration.topology_class.name.should == "Topology1"
end
describe "interface" do