Sha256: ea7aab3ea215185954ac12a9bd63169418dc2b18e3baf330ac7024d472ec7654
Contents?: true
Size: 408 Bytes
Versions: 14
Compression:
Stored size: 408 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Bulk enum definitions" do it 'define enum constants using block' do ActiveEnum.define do enum(:foo) do value :id => 1, :name => 'Foo 1' end enum(:bar) do value :id => 1, :name => 'Bar 1' end end Foo.all.should == [[1,'Foo 1']] Bar.all.should == [[1,'Bar 1']] end end
Version data entries
14 entries across 14 versions & 1 rubygems