Sha256: 08f2b8d1b04d5291c829b473238c2f4895ce51228dcabf7ee3604f51deaab1f6
Contents?: true
Size: 608 Bytes
Versions: 49
Compression:
Stored size: 608 Bytes
Contents
require 'rails_helper' describe 'current attributes' do it 'Current gets reset between requests' do allow(Current).to receive(:namespace=) allow(Current.instance).to receive(:reset) get '/contacto/new' expect(Current).to have_received(:namespace=).with(:public) expect(Current.instance).to have_received(:reset).at_least(:twice) expect(Current.namespace).to be_nil end it 'sets a current attribute' do Current.user = 1 expect(Current.namespace).to be_nil end it 'the attribute gets reset' do Current.namespace = 2 expect(Current.user).to be_nil end end
Version data entries
49 entries across 49 versions & 1 rubygems