Sha256: a14a383d65d830ab1928fed44eaa2516e3ec74040173be315f37f8b7676bdfdb

Contents?: true

Size: 1.14 KB

Versions: 8

Compression:

Stored size: 1.14 KB

Contents

require 'helper'

describe Gamebox::Configuration do
  describe ".add_setting" do
    it 'can add custom settings' do
      described_class.add_setting :foopy

      subject.foopy.should_not be
      subject.foopy?.should_not be
      subject.foopy = :yep
      subject.foopy.should == :yep
    end
  end

  describe "gamebox settings" do
    it 'has all the settings' do
      [ :config_path,
        :data_path,
        :music_path,
        :sound_path,
        :gfx_path,
        :fonts_path,
        :gb_config_path,
        :gb_data_path,
        :gb_music_path,
        :gb_sound_path,
        :gb_gfx_path,
        :gb_fonts_path,
        :game_name, 
        :needs_cursor,
        :stages ].each do |setting|
        subject.should respond_to(setting)
      end
    end

    describe "game_name" do
      it 'has default value' do
        subject.game_name.should == "Untitled Game"
      end
    end

    describe "needs_cursor" do
      it 'has default value' do
        subject.needs_cursor.should be_false
      end
    end

    describe "stages" do
      it 'has default value' do
        subject.stages.should == [:demo]
      end
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

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