diff --git a/spec/red_storm/dsl/bolt_spec.rb b/spec/red_storm/dsl/bolt_spec.rb index a512784..1c845ea 100644 --- a/spec/red_storm/dsl/bolt_spec.rb +++ b/spec/red_storm/dsl/bolt_spec.rb @@ -900,5 +900,11 @@ describe RedStorm::SimpleBolt do end end + describe 'inherited' do + it 'should calculate base class path correctly' do + expect(File).to receive(:expand_path).with(__FILE__) + class TestBolt < RedStorm::SimpleBolt; end + end + end end end diff --git a/spec/red_storm/dsl/spout_spec.rb b/spec/red_storm/dsl/spout_spec.rb index 7356a0c..1fbe1a8 100644 --- a/spec/red_storm/dsl/spout_spec.rb +++ b/spec/red_storm/dsl/spout_spec.rb @@ -895,5 +895,12 @@ describe RedStorm::SimpleSpout do spout.get_component_configuration.should be_instance_of(Backtype::Config) end end + + describe 'inherited' do + it 'should calculate base class path correctly' do + expect(File).to receive(:expand_path).with(__FILE__) + class TestSpout < RedStorm::SimpleSpout; end + end + end end end