Sha256: 2b177bea7b92438f6a1615ebd41b1997467c684b2241d535665b9988a53d9fc3
Contents?: true
Size: 495 Bytes
Versions: 10
Compression:
Stored size: 495 Bytes
Contents
require 'spec_helper' describe NinjaModel::Base do it_should_behave_like "ActiveModel" before { @klass = Class.new(NinjaModel::Base) @klass.send :attribute, :width, :integer @klass.send :attribute, :height, :integer @klass.send :attribute, :color, :string } it 'should instantiate from an existing data structure' do attrs = {:width => 100, :height => 200, :color => 'red'} @obj = @klass.new @obj.instantiate(attrs) @obj.width.should eql(100) end end
Version data entries
10 entries across 10 versions & 1 rubygems