Sha256: 8a88f17e3978a891dc027947a54a2737fcb51aee9b221f7e1725242d3bead6c1
Contents?: true
Size: 1.05 KB
Versions: 17
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' require 'simple_token_authentication/adapters/rails_api_adapter' describe 'SimpleTokenAuthentication::Adapters::RailsAPIAdapter' do before(:each) do stub_const('ActionController', Module.new) stub_const('ActionController::API', double()) @subject = SimpleTokenAuthentication::Adapters::RailsAPIAdapter end it_behaves_like 'an adapter' describe '.base_class' do it 'is ActionController::API', private: true do expect(@subject.base_class).to eq ActionController::API end end end context 'When the "API" acronym is not defined' do describe 'SimpleTokenAuthentication::Adapters::RailsApiAdapter' do before(:each) do stub_const('ActionController', Module.new) stub_const('ActionController::API', double()) @subject = SimpleTokenAuthentication::Adapters::RailsApiAdapter end it_behaves_like 'an adapter' describe '.base_class' do it 'is ActionController::API', private: true do expect(@subject.base_class).to eq ActionController::API end end end end
Version data entries
17 entries across 17 versions & 2 rubygems