File: struct_spec.rb

package info (click to toggle)
ruby-extlib 0.9.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 576 kB
  • sloc: ruby: 7,014; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 196 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'spec_helper'
require 'extlib/struct'

describe Struct do

  it "should have attributes" do

    s = Struct.new(:name).new('bob')
    s.attributes.should == { :name => 'bob' }

  end

end