Sha256: 5798147d324d752acd95559a67251c2d59ba52f237da0523e7abb019a143a32d
Contents?: true
Size: 551 Bytes
Versions: 9
Compression:
Stored size: 551 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 = lambda {|a| a } expect(guard).to be_controller_available SwitchUser.controller_guard = lambda {|a| !a } expect(guard).not_to be_controller_available end end end end
Version data entries
9 entries across 9 versions & 1 rubygems