spec/opentok/opentok_spec.rb in opentok-4.0.1 vs spec/opentok/opentok_spec.rb in opentok-4.1.0

- old
+ new

@@ -29,10 +29,14 @@ it "has the default api_url set" do expect(opentok.api_url).to eq default_api_url end + it "has the default timeout set" do + expect(opentok.timeout_length).to eq 2 + end + include_examples "opentok generates tokens" describe "#create_session" do let(:location) { '12.34.56.78' } @@ -135,9 +139,20 @@ expect(opentok.api_url).to eq api_url end # TODO: i don't need to run all the tests, just a set that checks for the URL's effect # include_examples "generates tokens" + end + + context "with a custom timeout_length" do + let(:timeout_length) { 10 } + let(:opentok) { OpenTok::OpenTok.new api_key, api_secret, :timeout_length => timeout_length } + + it { should be_an_instance_of(OpenTok::OpenTok) } + + it "should have an timeout_length property" do + expect(opentok.timeout_length).to eq timeout_length + end end context "with an addendum to the user agent string" do let(:opentok) { OpenTok::OpenTok.new api_key, api_secret, :ua_addendum => ua_addendum } let(:ua_addendum) { "BOOYAH"}