Sha256: eef788dbd0f3e81851e5d6128d3cc63625e3a3c7cb753df3bf73c471222a0bd8
Contents?: true
Size: 682 Bytes
Versions: 8
Compression:
Stored size: 682 Bytes
Contents
describe BubbleWrap::Device::Screen do describe "OS X" do describe 'on retina enabled screen' do before do @screen = Object.new.tap do |o| def o.respondsToSelector(selector) return true if selector == 'backingScaleFactor' NSScreen.mainScreen.respondsToSelector(selector) end def o.backingScaleFactor 2.0 end def o.method_missing(*args) NSScreen.mainScreen.send(*args) end end end describe '.retina?' do it 'returns true' do BW::Device::Screen.retina?(@screen).should == true end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems