Sha256: 5cd1da66fdbbca19b913ebdd8c5234604d2823638cbf351190f6be95c608680c
Contents?: true
Size: 673 Bytes
Versions: 37
Compression:
Stored size: 673 Bytes
Contents
Foo = Class.new Bar = Class.new RSpec.describe Rack::Tracker::HandlerDelegator do describe '#handler' do it 'will find handler in the Rack::Tracker namespace' do expect(described_class.handler(:google_analytics)).to eq(Rack::Tracker::GoogleAnalytics) end it 'will find handler outside the Rack::Tracker namespace' do expect(described_class.handler(:foo)).to eq(Foo) end it 'will just return a class' do expect(described_class.handler(Bar)).to eq(Bar) end it 'will raise when no handler is found' do expect { described_class.handler(:baz)}.to raise_error(ArgumentError, "No such Handler: Baz") end end end
Version data entries
37 entries across 37 versions & 1 rubygems