1
0
mirror of https://github.com/danbee/slugtastic synced 2025-03-04 08:49:05 +00:00
slugtastic/spec/slugtastic_spec.rb

19 lines
557 B
Ruby

# encoding: utf-8
require 'spec_helper'
describe Slugtastic do
describe ".generate_slug" do
it "generates a slug from a simple string" do
Slugtastic.generate_slug("A simple string.").should eq "a_simple_string"
end
it "handles strings with hypens in them" do
Slugtastic.generate_slug("A string - with Hyphens").should eq "a_string_-_with_hyphens"
end
it "handles strings with other characters in them" do
Slugtastic.generate_slug("A string, with /All sorts!").should eq "a_string_with_all_sorts"
end
end
end