Sha256: 2e26ae1ab7ad9c418aea34029bea1dac7b5296303a1f61c35121370a017a3522
Contents?: true
Size: 751 Bytes
Versions: 2
Compression:
Stored size: 751 Bytes
Contents
require 'unit_spec_helper' describe Rpush do it 'yields reflections for configuration' do did_yield = false Rpush.reflect { |on| 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-1.0.0-java | spec/unit/reflection_spec.rb |
rpush-1.0.0 | spec/unit/reflection_spec.rb |