Sha256: 490372ece1a9d5dd9e9b1b6cd19970edd078c647857bed9e603b943ad2b76648

Contents?: true

Size: 675 Bytes

Versions: 4

Compression:

Stored size: 675 Bytes

Contents

require File.join(File.dirname(__FILE__), '/../../spec_helper')

describe Thing do
  
  before(:each) do
    @window = stub :window
    @thing = Thing.new @window
  end
  
  describe "window" do
    it "should return the window" do
      @thing.window.should == @window
    end
  end
  
  describe "layer" do
    context 'default' do
      it "should be on the player layer" do
        @thing.layer.should == Layer::Players
      end
    end
    context 'non-default' do
      before(:each) do
        @thing.layer = :non_default_layer
      end
      it "should be on the non default layer" do
        @thing.layer.should == :non_default_layer
      end
    end
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gosu_extensions-0.1.15 spec/lib/units/thing_spec.rb
gosu_extensions-0.1.14 spec/lib/units/thing_spec.rb
gosu_extensions-0.1.13 spec/lib/units/thing_spec.rb
gosu_extensions-0.1.12 spec/lib/units/thing_spec.rb