Remove warnings "instance variable @{ivar} not initialized" in spec

This commit is contained in:
Kenichi Kamiya 2013-01-11 02:20:16 +09:00 committed by Erik Michaels-Ober
parent 960c2a4913
commit e3141b993d
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,10 @@ class ExampleStrategy
option :name, 'test'
def call(env); self.call!(env) end
attr_reader :last_env
def initialize(*args, &block)
super
@fail = nil
end
def request_phase
@fail = fail!(options[:failure]) if options[:failure]
@last_env = env

View File

@ -246,6 +246,10 @@ describe OmniAuth::Strategy do
end
describe "#call" do
before(:all) do
@options = nil
end
let(:strategy){ ExampleStrategy.new(app, @options || {}) }
context "omniauth.origin" do