Sha256: c01abd561fb718769792166a1c36c85703cb64a16060c6f24846de3cc30e9002

Contents?: true

Size: 837 Bytes

Versions: 16

Compression:

Stored size: 837 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

module PropertySpecHelper
  def valid_property_attributes
    {
      :name => "a_property",
      :presentation => "A Property"
    }
  end
end


describe Property do
  include PropertySpecHelper

  before(:each) do
    @property = Property.new
  end

  it "should not be valid when empty" do
    @property.should_not be_valid
  end

  ['name', 'presentation'].each do |field|
    it "should require #{field}" do
      @property.should_not be_valid
      @property.errors.full_messages.should include("#{field.humanize} #{I18n.translate("activerecord.errors.messages.blank")}")
    end
  end

  it "should be valid when having correct information" do
    @property.attributes = valid_property_attributes
    @property.should be_valid
  end

  it "should find all by prototype"
  
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 spec/models/property_spec.rb
spree-enriquez-0.9.4 spec/models/property_spec.rb
spree-0.9.4 spec/models/property_spec.rb
spree-0.9.3 spec/models/property_spec.rb
spree-0.9.2 spec/models/property_spec.rb
spree-0.9.1 spec/models/property_spec.rb
spree-0.9.0 spec/models/property_spec.rb
spree-0.8.4 spec/models/property_spec.rb
spree-0.8.5 spec/models/property_spec.rb
spree-0.6.0 spec/models/property_spec.rb
spree-0.7.0 spec/models/property_spec.rb
spree-0.7.1 spec/models/property_spec.rb
spree-0.8.0 spec/models/property_spec.rb
spree-0.8.1 spec/models/property_spec.rb
spree-0.8.2 spec/models/property_spec.rb
spree-0.8.3 spec/models/property_spec.rb