spec/ios/device_helpers_spec.rb in motion-kit-1.0.0 vs spec/ios/device_helpers_spec.rb in motion-kit-1.0.1
- old
+ new
@@ -5,10 +5,24 @@
end
it 'should have device helpers' do
@layout.context({}) do
@layout.iphone?.should == true
- @layout.iphone4?.should == true
+ if UIScreen.mainScreen.bounds.size.width == 320
+ @layout.iphone4?.should == true
+ else
+ @layout.iphone4?.should == false
+ end
+ if UIScreen.mainScreen.bounds.size.width == 375
+ @layout.iphone47?.should == true
+ else
+ @layout.iphone47?.should == false
+ end
+ if UIScreen.mainScreen.bounds.size.width == 375
+ @layout.iphone55?.should == true
+ else
+ @layout.iphone55?.should == false
+ end
@layout.iphone35?.should == false
@layout.ipad?.should == false
@layout.retina?.should == true
end
end