spec/omniauth/strategies/aleph_spec.rb in omniauth-aleph-0.1.1 vs spec/omniauth/strategies/aleph_spec.rb in omniauth-aleph-0.1.2
- old
+ new
@@ -1,17 +1,13 @@
require 'spec_helper'
describe "OmniAuth::Strategies::Aleph" do
- let(:request) do
- double('Request', params: {}, cookies: {}, env: {})
- end
context "when it's improperly configured" do
let(:config) {{ host: "host" }}
subject(:strategy) do
OmniAuth::Strategies::Aleph.new(nil, config).tap do |strategy|
- strategy.stub(:request) { request }
strategy.stub(:username) { aleph_username }
strategy.stub(:password) { aleph_password }
end
end
@@ -37,10 +33,9 @@
subject(:strategy) do
# First argument is the app, which gets called with env,
# i.e. app.call(env), so fake it with a stabby lambda
OmniAuth::Strategies::Aleph.new(->(env) {}, config).tap do |strategy|
- strategy.stub(:request) { request }
strategy.stub(:username) { aleph_username }
strategy.stub(:password) { aleph_password }
strategy.stub(:env) { {} }
strategy.stub(:fail!) { true }
end