spec/foyer/controller/helpers_spec.rb in foyer-0.2.0 vs spec/foyer/controller/helpers_spec.rb in foyer-0.2.1
- old
+ new
@@ -13,26 +13,26 @@
include Foyer::Controller::Helpers
end
subject { IncludesFoyerControllerHelpers.new }
- describe ".set_user_finder" do
- it "sets the :user_finder configuration to the provided block" do
- expect {
+ describe '.set_user_finder' do
+ it 'sets the :user_finder configuration to the provided block' do
+ expect do
subject.class_eval do
set_user_finder do |user_id|
user_id
end
end
- }.to change(Foyer, :user_finder)
+ end.to change(Foyer, :user_finder)
end
end
- describe "#current_user" do
- it "calls the user_finder method" do
+ describe '#current_user' do
+ it 'calls the user_finder method' do
@called = false
subject.send(:user_session)[:id] = '_'
- Foyer.user_finder = lambda { |_| @called = true }
+ Foyer.user_finder = ->(_) { @called = true }
subject.send :current_user
expect(@called).to eq true
end