Sha256: 7b324cb74765d3506226d70c914a28462303882103807830ed3310a15cc257c1
Contents?: true
Size: 921 Bytes
Versions: 4
Compression:
Stored size: 921 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../helpers.rb') context "an animation combination" do setup do obj = Object.new obj.extend Ray::Helper @target = OpenStruct.new(:color => Ray::Color.black, :pos => Ray::Vector2[50, 50]) @first = obj.translation(:of => [10, 10], :duration => 15) @second = obj.color_variation(:of => [10, 20, 30, 0], :duration => 10) obj.animation_combination(@first, @second).start(@target) end asserts_topic.kind_of Ray::Animation::Combination asserts("first element's target") { @first.target }.equals { @target } asserts("second element's target") { @second.target }.equals { @target } asserts(:duration).equals 15 context "updated" do hookup do stub(@second).update topic.update end asserts("each element") { @second }.received(:update) end end run_tests if __FILE__ == $0
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ray-0.2.1 | test/animation/combination_test.rb |
ray-0.2.0 | test/animation/combination_test.rb |
ray-0.1.1 | test/animation/combination_test.rb |
ray-0.1.0 | test/animation/combination_test.rb |