Sha256: 3398a23fef795077383d492d97ff6c1d4ec22688b3f20d5691a4da921027a32e
Contents?: true
Size: 935 Bytes
Versions: 15
Compression:
Stored size: 935 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Actions::ReloadLocalStorage do context '#initialize' do it 'requires a sinatra app' do expect { Actions::ReloadLocalStorage.new(sintra_app) } end end context '#run' do it 'reloads local storage' do storage = double('local_storage') sintra_app = double('sintra_app') expect(sintra_app).to receive(:set).with(:local_storage, storage) Actions::ReloadLocalStorage.new(sintra_app, storage).run end it 'reloads local storage for multiple apps' do storage = double('local_storage') sintra_app1 = double('sintra_app1') expect(sintra_app1).to receive(:set).with(:local_storage, storage) sintra_app2 = double('sintra_app2') expect(sintra_app2).to receive(:set).with(:local_storage, storage) Actions::ReloadLocalStorage.new([sintra_app1, sintra_app2], storage).run end end end
Version data entries
15 entries across 15 versions & 1 rubygems