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

Version Path
bubble-wrap-1.9.7 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.6 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.5 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.4 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.3 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.2 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.1 spec/motion/core/device/osx/screen_spec.rb
bubble-wrap-1.9.0 spec/motion/core/device/osx/screen_spec.rb