Class Spec::Example::ExampleGroup
In: lib/limelight/specs/spec_helper.rb
Parent: Object

Methods

Included Modules

Limelight::Specs::SpecHelper

Public Class methods

[Source]

    # File lib/limelight/specs/spec_helper.rb, line 86
86:       def self.uses_limelight(options = {}, &prop_block)
87:         include Limelight::Specs::SpecHelper
88:         
89:         before(:each) do
90:           @ll_spec_options = options
91:           @prop_block = prop_block
92:           @player = @scene = nil
93:           create_accessor_for(@ll_spec_options[:with_player]) if @ll_spec_options[:with_player]
94:         end
95:       end

Deprecated

[Source]

    # File lib/limelight/specs/spec_helper.rb, line 82
82:       def self.uses_scene(scene_name, options = {})
83:         uses_limelight({:scene => scene_name}.merge(options))
84:       end

Public Instance methods

[Source]

     # File lib/limelight/specs/spec_helper.rb, line 126
126:       def create_accessor_for(player_name)
127:         accessor = "def \#{player_name}\nreturn scene.find('\#{player_name}')\nend\n"
128:         eval(accessor)
129:       end

[Source]

     # File lib/limelight/specs/spec_helper.rb, line 107
107:       def producer
108:         if Limelight::Specs.producer.nil?
109:           if $with_ui
110:             Limelight::Main.initializeContext
111:           else
112:             Limelight::Main.initializeTestContext
113:           end
114:           raise "$PRODUCTION_PATH undefined.  Make sure you specify the location of the production in $PRODUCTION_PATH." unless defined?($PRODUCTION_PATH)
115:           raise "Could not find production: '#{$PRODUCTION_PATH}'. Check $PRODUCTION_PATH." unless File.exists?($PRODUCTION_PATH)
116:           Limelight::Specs.producer = Limelight::Producer.new($PRODUCTION_PATH)
117:           Limelight::Specs.producer.load
118:         end
119:         return Limelight::Specs.producer
120:       end

[Source]

     # File lib/limelight/specs/spec_helper.rb, line 122
122:       def production
123:         return producer.production
124:       end

[Validate]