Sha256: cfa64cf9aa6b92fb297885d63e682a1ebb275cbc2ace6141805799fe2fa82294
Contents?: true
Size: 410 Bytes
Versions: 1
Compression:
Stored size: 410 Bytes
Contents
require 'spec_helper' describe Signal::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-0.3.0 | spec/signal/call_spec.rb |