Skip to content

Commit

Permalink
Silence OpenID warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Aug 9, 2008
1 parent f5d2c1d commit 587f411
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/spec_rack_auth_openid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
end

specify 'extensions should have Request and Response defined and inherit from OpenID::Extension' do
$-w, w = nil, $-w # yuck
ext = Module.new
ext::Request = nil
ext::Response = nil
Expand All @@ -107,9 +108,11 @@
lambda{OID.new(realm).add_extension(ext)}.
should.raise(TypeError).
message.should.match(/NS_URI/)
$-w = w
end

specify 'extensions should have NS_URI defined and be a string of an absolute http uri' do
$-w, w = nil, $-w # yuck
ext = Module.new
ext::Request = Class.new(::OpenID::Extension)
ext::Response = Class.new(::OpenID::Extension)
Expand All @@ -124,5 +127,6 @@
ext::NS_URI = 'http://openid.net'
lambda{OID.new(realm).add_extension(ext)}.
should.not.raise
$-w = w
end
end

0 comments on commit 587f411

Please sign in to comment.