Sha256: 59856a4466ee6fd2d219a566472417f75987d5b30bb16b30dd31794ec39f0064
Contents?: true
Size: 828 Bytes
Versions: 33
Compression:
Stored size: 828 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe DattsRight, ".remove_dynamic_attribute(attr_key)" do before do reset_database @page = Page.create end it "should be aliased by remove_datt" do Page.instance_method(:remove_dynamic_attribute).should == Page.instance_method(:remove_datt) end it "should remove the attribute completely" do @page.add_dynamic_attribute(:rocks, "string") @page.remove_dynamic_attribute(:rocks) lambda { @page.rocks }.should raise_error(NoMethodError) end it "should not explode if the attribute being removed isn't there" do @page.add_dynamic_attribute(:rocks, "string") @page.remove_dynamic_attribute(:rocks) lambda { @page.remove_dynamic_attribute(:rocks) }.should_not raise_error(NoMethodError) end end
Version data entries
33 entries across 20 versions & 1 rubygems