Sha256: 5df53018b8ee1ced462326f5bb13f57f85ed6fb8b9b43c5affb158db93612bc2
Contents?: true
Size: 509 Bytes
Versions: 2
Compression:
Stored size: 509 Bytes
Contents
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the MIT license. require File.expand_path('../../../../lib/ramaze/spec/helper/snippets', __FILE__) describe Ramaze::Struct do should 'provide #values_at' do Point = Ramaze::Struct.new(:x, :y) point = Point.new(15, 10) point.values_at(1, 0).should == [10, 15] point.values_at(0..1).should == [15, 10] point.values_at(:y, :x).should == [10, 15] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2012.04.14 | spec/snippets/ramaze/struct.rb |
ramaze-2012.03.07 | spec/snippets/ramaze/struct.rb |