spec/dde/monitor_spec.rb in dde-0.2.2 vs spec/dde/monitor_spec.rb in dde-0.2.8
- old
+ new
@@ -1,17 +1,30 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path(File.dirname(__FILE__) + '/app_shared')
module DDETest
describe DDE::Monitor do
- after(:each){@monitor.stop_dde}
-
+ before(:each){ @monitor = DDE::Monitor.new }
+ after(:each){ @monitor.stop_dde }
+
+ it_should_behave_like "DDE App"
+
it 'starts without constructor parameters' do
@monitor = DDE::Monitor.new
@monitor.id.should be_an Integer
@monitor.id.should_not == 0
@monitor.dde_active?.should == true
+
+ @monitor.init_flags.should == APPCLASS_MONITOR | # this is monitor
+ MF_CALLBACKS | # monitor callback functions
+ MF_CONV | # monitor conversation data
+ MF_ERRORS | # monitor DDEML errors
+ MF_HSZ_INFO | # monitor data handle activity
+ MF_LINKS | # monitor advise loops
+ MF_POSTMSGS | # monitor posted DDE messages
+ MF_SENDMSGS # monitor sent DDE messages
end
# context 'with existing DDE clients and server supporting "service" topic' do
# before(:each )do
# @client_calls = []
\ No newline at end of file