Sha256: 0984cef9a0c95ea3f521215c37b8b8721ff81ae18f1b54598d66dd0135b305cb
Contents?: true
Size: 771 Bytes
Versions: 12
Compression:
Stored size: 771 Bytes
Contents
require 'unit_spec_helper' describe Rpush do it 'yields reflections for configuration' do did_yield = false Rpush.reflect { did_yield = true } did_yield.should be_true end it 'returns all reflections' do Rpush.reflections.should be_kind_of(Rpush::Reflections) end end describe Rpush::Reflections do it 'dispatches the given reflection' do did_yield = false Rpush.reflect do |on| on.error { did_yield = true } end Rpush.reflections.__dispatch(:error) did_yield.should be_true end it 'raises an error when trying to dispatch and unknown reflection' do expect do Rpush.reflections.__dispatch(:unknown) end.to raise_error(Rpush::Reflections::NoSuchReflectionError) end end
Version data entries
12 entries across 12 versions & 1 rubygems