Sha256: 908d3cb12b1d338e6c7761c70d3d7502350e6442921b7939128c92f286792932

Contents?: true

Size: 525 Bytes

Versions: 5

Compression:

Stored size: 525 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

module Slugify
  describe "STI" do
    it "should be able to slug a title in a base class" do
      base = BaseClass.new
      base.title = "Foo"
      base.save!
      
      base.reload
      base.slug.should == "foo"
    end
    
    it "should be able to slug a title in the subclass" do
      subclass = SubClass.new
      subclass.title = "Foo"
      subclass.save!
      
      subclass.reload
      subclass.slug.should == "foo"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ginst-2009.12.8 vendor/plugins/slugify/spec/slugify/sti_spec.rb
ginst-2009.11.24 vendor/plugins/slugify/spec/slugify/sti_spec.rb
ginst-2009.11.23 vendor/plugins/slugify/spec/slugify/sti_spec.rb
ginst-2.0.1 vendor/plugins/slugify/spec/slugify/sti_spec.rb
ginst-2.0.0 vendor/plugins/slugify/spec/slugify/sti_spec.rb