Skip to content

Instantly share code, notes, and snippets.

@Groogy
Last active December 15, 2015 08:49
Show Gist options
  • Save Groogy/5234007 to your computer and use it in GitHub Desktop.
Save Groogy/5234007 to your computer and use it in GitHub Desktop.
require 'sfml/all'
require 'tyr/entity'
require 'tyr/entity_data'
require 'tyr/entity_builder'
describe Tyr::EntityBuilder do
subject do
type = Tyr::EntityData.new()
type.entity_class = Tyr::Entity
Tyr::EntityBuilder.new(type)
end
let(:renderer) { double("Renderer") }
before(:each) do
renderer.stub(:add_representation)
end
it "should create an entity object" do
entity, visual = subject.build()
entity.class.should be(Tyr::Entity)
renderer.add_representation(visual)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment