Sha256: 77aac0144c2bb5f8a5a3ee4e0c2dac52138e05516959776e360edcfd0cf545e2

Contents?: true

Size: 668 Bytes

Versions: 10

Compression:

Stored size: 668 Bytes

Contents

describe "UIControlWrap" do

  it "should support the 'when' event handler" do
    button = UIButton.buttonWithType(UIButtonTypeRoundedRect)
    touched = nil
    button.when(UIControlEventTouchUpInside) do
      touched = 'for the very first time'
    end
    button.sendActionsForControlEvents(UIControlEventTouchUpInside)
    touched.should == 'for the very first time'
  end

  it "should support the 'when' event handler for UISlider" do
    button = UISlider.alloc.init
    changed = nil
    button.when(UIControlEventValueChanged) do
      changed = 1
    end
    button.sendActionsForControlEvents(UIControlEventValueChanged)
    changed.should == 1
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bubble-wrap-1.1.3 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.1.2 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.1.1 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.1.0 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.0.0 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.0.0.pre.2 spec/motion/core/ui_control_spec.rb
bubble-wrap-1.0.0.pre spec/core/ui_control_spec.rb
bubble-wrap-0.4.0 spec/core/ui_control_spec.rb
bubble-wrap-0.3.1 spec/ui_control_spec.rb
bubble-wrap-0.3.0 spec/ui_control_spec.rb