Sha256: 992d27957efb791bd2aa58d05552221cdbf52b3af9fb0b027f1f93e386b74030

Contents?: true

Size: 1 KB

Versions: 8

Compression:

Stored size: 1 KB

Contents

require 'helper'

describe WrappedScreen do
  inject_mocks :config_manager

  before do
    @config_manager.stubs(:[]).with(:screen_resolution).returns [800,555]
    @config_manager.stubs(:[]).with(:fullscreen).returns false

    @gosu_window = stub('gosu window', :caption= => nil, :needs_cursor= => nil)
    HookedGosuWindow.stubs(:new).with(800, 555, false).returns @gosu_window
  end

  describe "#setup" do
    it 'creates a new Gosu Window with opts from config manager' do

      @gosu_window.expects(:caption=).with(Gamebox.configuration.game_name)
      @gosu_window.expects(:needs_cursor=).with(Gamebox.configuration.needs_cursor?)

      subject.screen.should == @gosu_window
    end
  end

  describe "#draw_rotated_image" do
    it 'passes the args along to the image to draw itself' do
      image = mock
      image.expects(:draw_rot).with(:x, :y, :z, :angle, :cx, :cy, :sx, :sy, :color, :mode)
      subject.draw_rotated_image(image, :x, :y, :z, :angle, :cx, :cy, :sx, :sy, :color, :mode)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gamebox-0.5.5 spec/core/wrapped_screen_spec.rb
gamebox-0.5.4 spec/core/wrapped_screen_spec.rb
gamebox-0.5.2 spec/core/wrapped_screen_spec.rb
gamebox-0.5.1 spec/core/wrapped_screen_spec.rb
gamebox-0.5.0 spec/core/wrapped_screen_spec.rb
gamebox-0.4.1 spec/core/wrapped_screen_spec.rb
gamebox-0.4.0 spec/core/wrapped_screen_spec.rb
gamebox-0.4.0.rc11 spec/core/wrapped_screen_spec.rb