spec/unit/rtsp_spec.rb in rtsp-0.4.3 vs spec/unit/rtsp_spec.rb in rtsp-0.4.4

- old
+ new

@@ -15,13 +15,25 @@ end end end describe RTSP do - it "should have a VERSION constant" do - RTSP.const_defined?('VERSION').should be_true + describe '.release_version?' do + specify { RTSP.release_version?.should be_true } end - it "has version 0.4.3" do - RTSP::VERSION.should == '0.4.3' + describe '.snapshot_version?' do + specify { RTSP.snapshot_version?.should be_false } + end + + describe RTSP::VERSION do + it 'is set correctly' do + if RTSP.release_version? + RTSP::VERSION.should == '0.4.4' + elsif RTSP.snapshot_version? + RTSP::VERSION.should == '0.4.4.SNAPSHOT' + else + RTSP::VERSION.should match %r[0\.4\.4\.\d{8}\.\d{6}] + end + end end end