Sha256: badcc2b51f58d76c7d3b2d9037deb47c44c822374da1caaa781d3ce9871990e3
Contents?: true
Size: 485 Bytes
Versions: 39
Compression:
Stored size: 485 Bytes
Contents
require File.join(File.dirname(__FILE__), '/../../spec_helper') describe Targetable do before(:each) do @targetable = Class.new do include Targetable end.new end describe "distance_from" do before(:each) do @targetable.stub! :position => CP::Vec2.new(6, 8) @shooter = stub :shooter, :position => CP::Vec2.new(3, 4) end it "should return the right distance" do @targetable.distance_from(@shooter).should == 5.0 end end end
Version data entries
39 entries across 39 versions & 1 rubygems