Sha256: c8fe9a3cecf866df3f8e6d41244c077a0d4aa4c002d22bec18f65ba475f5341d

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

describe Joybox::Core::Screen do
  before do
    @window = NSApplication.sharedApplication.windows[0]
  end

  it "should return the width of the screen" do
    Screen.width.should == @window.contentView.bounds.size.width
  end

  it "should return the half of the screen width" do
    Screen.half_width.should == @window.contentView.bounds.size.width / 2
  end

  it "should return the height of the screen" do
    Screen.height.should == @window.contentView.bounds.size.height
  end

  it "should return the half of the screen height" do
    Screen.half_height.should == @window.contentView.bounds.size.height / 2
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 spec/motion/joybox-osx/common/screen_spec.rb
joybox-1.1.0 spec/motion/joybox-osx/common/screen_spec.rb