Sha256: 4256c79d937e340bb023a72b021e42127181037a49542f8ce0b7f01973ab5b3a

Contents?: true

Size: 747 Bytes

Versions: 15

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'
include DynamicFieldsets
  
describe FieldHtmlAttribute do
  include FieldHtmlAttributeHelper

  it "should respond to field" do
    field_html_attribute = FieldHtmlAttribute.new
    field_html_attribute.should respond_to :field
  end
  
  describe "validations" do
    before(:each) do
      @field_html_attribute = FieldHtmlAttribute.new
    end

    it "should be valid" do
      @field_html_attribute.attributes = valid_attributes
      @field_html_attribute.should be_valid
    end

    it "should require an attribute" do
      @field_html_attribute.should have(1).error_on(:attribute_name)
    end
    
    it "should require a value" do
      @field_html_attribute.should have(1).error_on(:value)
    end
  end  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dynamic_fieldsets-0.0.16 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.15 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.14 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.13 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.12 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.11 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.10 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.9 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.8 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.7 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.6 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.5 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.4 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.3 spec/models/field_html_attribute_spec.rb
dynamic_fieldsets-0.0.2 spec/models/field_html_attribute_spec.rb