Sha256: 96676b164dc72782b1b360c878976d8fd8270a82789f5ee29a17ed60025f4d2a
Contents?: true
Size: 943 Bytes
Versions: 1
Compression:
Stored size: 943 Bytes
Contents
require_relative '../../../test_helper' require_relative '../../../../lib/vedeu/support/events' module Vedeu describe Events do let(:described_class) { Events } let(:described_instance) { described_class.new } describe '#initialize' do let(:subject) { described_instance } it 'returns an Events instance' do subject.must_be_instance_of(Events) end it 'sets an instance variable' do subject.instance_variable_get('@handlers') .must_be_instance_of(Hash) end end describe '#on' do let(:subject) { described_instance.on(event) { :do_something } } let(:event) { :some_event } it 'returns the handlers value' do subject.must_be_instance_of(Array) end end describe '#trigger' do let(:subject) { described_instance.trigger(event, args) } let(:event) { :some_event } let(:args) {} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.0.26 | test/lib/vedeu/support/events_test.rb |