Sha256: c067a74e1f130c73522b56f76d8e149272e50f02516554aecb310419a61c9a7a

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

describe 'Device helpers' do

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

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

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

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

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

      @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 == false
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
motion-kit-1.1.1 spec/tvos/device_helpers_spec.rb
motion-kit-1.1.0 spec/tvos/device_helpers_spec.rb
motion-kit-1.0.3 spec/tvos/device_helpers_spec.rb
motion-kit-1.0.2 spec/tvos/device_helpers_spec.rb
motion-kit-1.0.1 spec/tvos/device_helpers_spec.rb
motion-kit-1.0.0 spec/tvos/device_helpers_spec.rb