Sha256: 77817d7b90b74495da83ca19cdf157fb9875f0bddd9e81c90535d6d085d5d304

Contents?: true

Size: 300 Bytes

Versions: 18

Compression:

Stored size: 300 Bytes

Contents

require 'spec/helper'

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

18 entries across 18 versions & 4 rubygems

Version Path
Pistos-ramaze-2009.04.08 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.04.01 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.04.08 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.04.18 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.04.22 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.04 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.05.08 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.05 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.06.04 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.06.12 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.06 spec/snippets/ramaze/struct.rb
rjspotter-ramaze-2009.06.29 spec/snippets/ramaze/struct.rb
rjspotter-ramaze-2009.06.31 spec/snippets/ramaze/struct.rb
ramaze-2009.04 spec/snippets/ramaze/struct.rb
ramaze-2009.05 spec/snippets/ramaze/struct.rb
ramaze-2009.06.12 spec/snippets/ramaze/struct.rb
ramaze-2009.06 spec/snippets/ramaze/struct.rb
ramaze-2009.06.04 spec/snippets/ramaze/struct.rb