Sha256: dcdba9caf420819c19fcdbc9109c9477bb95b5ca37bc30d897688de1f2bb8205
Contents?: true
Size: 422 Bytes
Versions: 1
Compression:
Stored size: 422 Bytes
Contents
require 'spec_helper' describe Signal::Extensions::Call do let(:callable) { Callable.new } it 'initializes observable with arguments' do observable = ObservableWithCall.call(1, 2, 3) {} expect(observable.args).to eq([1, 2, 3]) end it 'triggers event' do expect(callable).to receive(:called).with([1, 2, 3]) ObservableWithCall.call(1, 2, 3) do |o| o.on(:args, &callable) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
signal-1.0.0 | spec/signal/call_spec.rb |