Sha256: b7a2f8ef33f98c5028843ef29166e6760a711342787fc67ffc6b48834284c6ac
Contents?: true
Size: 1.21 KB
Versions: 7
Compression:
Stored size: 1.21 KB
Contents
Given /^I haven't made any RTSP requests$/ do RTSP::Client.configure { |config| config.log = false } end Given /^I have set up a stream$/ do @url = "rtsp://fake-rtsp-server/some_path" @client = RTSP::Client.new(@url) do |connection| connection.socket = @fake_server connection.timeout = 3 end @client.setup @url @client.session_state.should == :ready end Given /^I have started (playing|recording) a stream$/ do |method| if method == "playing" @client.setup @url @client.play @url elsif method == "recording" @client.record @url end @client.session_state.should == method.to_sym end When /^I issue an "([^"]*)" request with "([^"]*)"$/ do |request_type, params| unless @client url = "rtsp://fake-rtsp-server/some_path" @client = RTSP::Client.new(url) do |connection| connection.socket = @fake_server connection.timeout = 3 end end @initial_state = @client.session_state params = params.empty? ? {} : params @client.send(request_type.to_sym, params) end Then /^the state stays the same$/ do @client.session_state.should == @initial_state end Then /^the state changes to "([^"]*)"$/ do |new_state| @client.session_state.should == new_state.to_sym end
Version data entries
7 entries across 7 versions & 1 rubygems