Sha256: a6712bb024e08701667b7c1c20f6451e9d4199086ff17e4ec1b2a1b7b2c3847a
Contents?: true
Size: 567 Bytes
Versions: 19
Compression:
Stored size: 567 Bytes
Contents
require 'spec_helper' describe NinjaModel::Base do class LintTester < NinjaModel::Base; end subject { LintTester.new } 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
19 entries across 19 versions & 1 rubygems