Sha256: c4089bd5a04d1155b9becc507a120f865b0509f2c1574ae55465f0ec9ff852d1
Contents?: true
Size: 833 Bytes
Versions: 26
Compression:
Stored size: 833 Bytes
Contents
require 'spec_helper' describe RailsBestPractices::Core::ModelAttributes do let(:model_attributes) { RailsBestPractices::Core::ModelAttributes.new } before :each do model_attributes.add_attribute("Post", "title", :string) model_attributes.add_attribute("Post", "user_id", :integer) end it "should get model attributes" do model_attributes.get_attribute_type("Post", "title").should == :string model_attributes.get_attribute_type("Post", "user_id").should == :integer model_attributes.get_attribute_type("Post", "unknonw").should be_nil end it "should check is model attributes" do model_attributes.is_attribute?("Post", "title").should be_true model_attributes.is_attribute?("Post", "user_id").should be_true model_attributes.is_attribute?("Post", "unknonw").should be_false end end
Version data entries
26 entries across 26 versions & 3 rubygems