Sha256: 9a26c6fe1d38dca4b27a13a7d2952e115754c9a404b1a462231eaa22ca6b1216

Contents?: true

Size: 701 Bytes

Versions: 5

Compression:

Stored size: 701 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
 end

 describe Rpush::ReflectionCollection do
   it 'dispatches the given reflection' do
     did_yield = false
     Rpush.reflect do |on|
       on.error { did_yield = true }
     end
     Rpush.reflection_stack[0].__dispatch(:error)
     did_yield.should be_true
   end

   it 'raises an error when trying to dispatch and unknown reflection' do
     expect do
       Rpush.reflection_stack[0].__dispatch(:unknown)
     end.to raise_error(Rpush::ReflectionCollection::NoSuchReflectionError)
   end
 end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rpush-2.3.1-java spec/unit/reflection_collection_spec.rb
rpush-2.3.1 spec/unit/reflection_collection_spec.rb
rpush-2.3.0-java spec/unit/reflection_collection_spec.rb
rpush-2.3.0 spec/unit/reflection_collection_spec.rb
rpush-2.3.0.rc1 spec/unit/reflection_collection_spec.rb