Sha256: 471f6c5ea8ea01453a6a412353a2e30cc3505ed0b17edc2b895c809e5246cb82
Contents?: true
Size: 1.11 KB
Versions: 15
Compression:
Stored size: 1.11 KB
Contents
describe 'UIControl' do tests UIControlController before do controller.reset end it 'should have two buttons' do UIButton.should === controller.button1 UIButton.should === controller.button2 end it 'button1 should respond to touches' do controller.button1.sendActionsForControlEvents(:touch.uicontrolevent) controller.touched.should == controller.button1 controller.touched_1.should == true controller.touched_count.should == 1 end it 'button2 should respond to touches' do controller.button2.sendActionsForControlEvents(:touch.uicontrolevent) controller.touched.should == controller.button2 controller.touched_2.should == true controller.touched_count.should == 1 end it 'should be able to share handlers with arity 1 (sender)' do controller.button1.sendActionsForControlEvents(:touch.uicontrolevent) controller.button2.sendActionsForControlEvents(:touch.uicontrolevent) controller.touched.should == controller.button2 controller.touched_1.should == true controller.touched_2.should == true controller.touched_count.should == 2 end end
Version data entries
15 entries across 15 versions & 1 rubygems