Sha256: 65ecbcd247696d98c9c554c587f788a2fd43386558f7478702579cbc8ecf4d73
Contents?: true
Size: 851 Bytes
Versions: 18
Compression:
Stored size: 851 Bytes
Contents
require 'spec_helper' module RailsBestPractices::Core describe ModelAttributes do let(:model_attributes) { 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 end
Version data entries
18 entries across 18 versions & 1 rubygems