Sha256: 7414dbec093af72c68fdcff6ed22a1c51eafdf27e27a577b900d8e2579b8c2c5
Contents?: true
Size: 1012 Bytes
Versions: 5
Compression:
Stored size: 1012 Bytes
Contents
require 'spec_helper' describe Gecko::Pusher do describe "Creating a channel" do context "without setting an API key" do before(:each) do Gecko::Pusher.api_key = nil end it "should raise a Gecko::Pusher::NotInitializedError" do expect { Gecko::Pusher.channel(:text, "widget_key") }.should raise_error(Gecko::Pusher::NotInitializedError) end end context "after setting an API key" do before(:each) do Gecko::Pusher.api_key = "ABC123" end context "without an invalid widget key" do it "should raise an ArgumentError" do expect { Gecko::Pusher.channel(:text, nil) }.should raise_error(ArgumentError) end end context "with an invalid type" do it "should raise an ArgumentError" do expect { Gecko::Pusher.channel(:invalid_type, "abc123") }.should raise_error(ArgumentError) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems