Sha256: 979f1a2e9e6d55501b146a4ec7c99a480fe85f4b92ac57329f4d2d5cb2e7ab70

Contents?: true

Size: 976 Bytes

Versions: 31

Compression:

Stored size: 976 Bytes

Contents

describe 'Device helpers' do

  before do
    @layout = MK::Layout.new
  end

  it 'should have device helpers' do
    @layout.context({}) do
      @layout.iphone?.should == true
      @layout.iphone4?.should == true
      @layout.iphone35?.should == false
      @layout.ipad?.should == false
      @layout.retina?.should == true
    end
  end

  it 'should have device (iphone do end) helpers' do
    @layout.context({}) do
      @check = false
      @layout.iphone do
        @check = true
      end
      @check.should == true

      @check = false
      @layout.iphone4 do
        @check = true
      end
      @check.should == true

      @check = false
      @layout.iphone35 do
        @check = true
      end
      @check.should == false

      @check = false
      @layout.ipad do
        @check = true
      end
      @check.should == false

      @check = false
      @layout.retina do
        @check = true
      end
      @check.should == true
    end
  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
motion-kit-1.0.0 spec/ios/device_helpers_spec.rb
motion-kit-0.18.0 spec/ios/device_helpers_spec.rb
motion-kit-0.17.0 spec/ios/device_helpers_spec.rb
motion-kit-0.16.0 spec/ios/device_helpers_spec.rb
motion-kit-0.15.0 spec/ios/device_helpers_spec.rb
motion-kit-0.14.2 spec/ios/device_helpers_spec.rb
motion-kit-0.14.1 spec/ios/device_helpers_spec.rb
motion-kit-0.14.0 spec/ios/device_helpers_spec.rb
motion-kit-0.13.0 spec/ios/device_helpers_spec.rb
motion-kit-0.12.0 spec/ios/device_helpers_spec.rb
motion-kit-0.11.2 spec/ios/device_helpers_spec.rb
motion-kit-0.11.1 spec/ios/device_helpers_spec.rb
motion-kit-0.11.0 spec/ios/device_helpers_spec.rb
motion-kit-0.10.11 spec/ios/device_helpers_spec.rb
motion-kit-0.10.10 spec/ios/device_helpers_spec.rb
motion-kit-0.10.9 spec/ios/device_helpers_spec.rb
motion-kit-0.10.8 spec/ios/device_helpers_spec.rb
motion-kit-0.10.7 spec/ios/device_helpers_spec.rb
motion-kit-0.10.6 spec/ios/device_helpers_spec.rb
motion-kit-0.10.5 spec/ios/device_helpers_spec.rb