Sha256: 885c01d7491b6b3b761b1310b083ee401376bd839d9928ed5f7614c51df222c4
Contents?: true
Size: 763 Bytes
Versions: 37
Compression:
Stored size: 763 Bytes
Contents
class Dummy < Rack::Tracker::Handler end RSpec.describe Rack::Tracker::HandlerSet do let(:set) do Rack::Tracker::HandlerSet.new do handler 'dummy', {foo: "bar"} end end describe '#each' do subject { set.each } specify { expect(subject.to_a.size).to eq(1) } specify { expect(subject).to match_array(Dummy) } end describe Rack::Tracker::HandlerSet::Handler do subject { described_class.new(Dummy, {foo: 'bar'}) } describe '#init' do it 'will initialize the handler with the given class' do expect(subject.init({})).to be_kind_of(Dummy) end it 'will initialize the handler with the given options' do expect(subject.init({}).options).to eq({foo: 'bar'}) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems