Sha256: 8d3d879d1bb0401de95b67843911f23759839a6ac79e2e39e4701863e89f882d
Contents?: true
Size: 751 Bytes
Versions: 3
Compression:
Stored size: 751 Bytes
Contents
shared_examples "an element that can respond to change" do describe "when passing a block to the constructor" do it "should notify the block of change events" do expect(input_block).to receive(:call).with(subject) subject.call_change_listeners end end describe "when setting up a callback with #change" do it "should notify the callback of change events" do called = false subject.change do |element| called = true end subject.call_change_listeners expect(called).to be_truthy end it "should pass the element itself to the callback" do subject.change do |element| expect(element).to eq(subject) end subject.call_change_listeners end end end
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
shoes-core-4.0.0.pre3 | spec/shoes/shared_examples/changeable.rb |
shoes-swt-4.0.0.pre2 | spec/shoes/shared_examples/changeable.rb |
shoes-dsl-4.0.0.pre2 | spec/shoes/shared_examples/changeable.rb |