Browse files

Allow instantiating an Urbanairship::Client

  • Loading branch information...
1 parent ec1b681 commit 667b8b35317d720550aa23398e473f896aa429c6 @agnoster agnoster committed Nov 6, 2012
Showing with 13 additions and 1 deletion.
  1. +4 −0 lib/urbanairship.rb
  2. +9 −1 spec/urbanairship_spec.rb
View
4 lib/urbanairship.rb
@@ -132,4 +132,8 @@ def request_timeout
class << self
include ClassMethods
end
+
+ class Client
+ include ClassMethods
+ end
end
View
10 spec/urbanairship_spec.rb
@@ -1,4 +1,4 @@
-describe Urbanairship do
+shared_examples_for "an Urbanairship client" do
before(:all) do
FakeWeb.allow_net_connect = false
@@ -492,6 +492,14 @@
end
end
+describe Urbanairship do
+ it_should_behave_like "an Urbanairship client"
+end
+
+describe Urbanairship::Client do
+ it_should_behave_like "an Urbanairship client"
+end
+
def request_json
JSON.parse FakeWeb.last_request.body
end

0 comments on commit 667b8b3

Please sign in to comment.