Sha256: b022bb7ef3d1ac1b0ccce41cf1b252679e57a28f4e1c2ff804c392a01976fa41

Contents?: true

Size: 1021 Bytes

Versions: 6

Compression:

Stored size: 1021 Bytes

Contents

describe UIView do

  before do
    @view = App.delegate.window.rootViewController.view
    @orig = @view.isUserInteractionEnabled
    @view.setUserInteractionEnabled false
  end

  after do
    @view.setUserInteractionEnabled @orig
  end

  testMethod = proc do |method|
    it 'enables interaction when called' do
      @view.send(method, &:nil)
      @view.isUserInteractionEnabled.should == true
    end

    it "doesn't enable interaction if asked not to" do
      @view.send(method, false, &:nil)
      @view.isUserInteractionEnabled.should == false
    end

    # it 'responds to interaction'
  end

  describe '#whenTapped' do
    testMethod.call :whenTapped
  end

  describe '#whenPinched' do
    testMethod.call :whenPinched
  end

  describe '#whenRotated' do
    testMethod.call :whenRotated
  end
  
  describe '#whenSwiped' do
    testMethod.call :whenSwiped
  end

  describe '#whenPanned' do
    testMethod.call :whenPanned
  end

  describe '#whenPressed' do
    testMethod.call :whenPressed
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bubble-wrap-1.0.0 spec/motion/core/gestures_spec.rb
bubble-wrap-1.0.0.pre.2 spec/motion/core/gestures_spec.rb
bubble-wrap-1.0.0.pre spec/core/gestures_spec.rb
bubble-wrap-0.4.0 spec/core/gestures_spec.rb
bubble-wrap-0.3.1 spec/gestures_spec.rb
bubble-wrap-0.3.0 spec/gestures_spec.rb