Sha256: bb89b58fe1b0a0fe2bed729fce917a0d459fbfdb42268f2947ce7537d8c26eb4
Contents?: true
Size: 543 Bytes
Versions: 1
Compression:
Stored size: 543 Bytes
Contents
require 'spec_helper' module SwitchUser RSpec.describe LambdaGuard do describe "#controller_available?" do it "calls the controller_guard proc" do controller = double.as_null_object provider = double.as_null_object guard = SwitchUser::LambdaGuard.new(controller, provider) SwitchUser.controller_guard = ->(a) { a } expect(guard).to be_controller_available SwitchUser.controller_guard = ->(a) { !a } expect(guard).not_to be_controller_available end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switch_user-1.5.0 | spec/switch_user/lambda_guard_spec.rb |