Skip to content

Commit

Permalink
Yo dawg, I heard you like typos so I put an epic typo in your typo so…
Browse files Browse the repository at this point in the history
… you can typo while you typo
  • Loading branch information
fdevillamil committed Sep 28, 2011
1 parent 1422de9 commit 4779a1f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/page.rb
Expand Up @@ -4,7 +4,7 @@ class Page < Content
validates_uniqueness_of :name

include ConfigManager
include Satanizable
include Sanitizable
extend ActiveSupport::Memoizable
serialize :settings, Hash

Expand Down
2 changes: 1 addition & 1 deletion app/models/post_type.rb
@@ -1,6 +1,6 @@
# coding: utf-8
class PostType < ActiveRecord::Base
include Satanizable
include Sanitizable
validates_uniqueness_of :name
validates_presence_of :name
validate :name_is_not_read
Expand Down
2 changes: 1 addition & 1 deletion app/models/satanizable.rb → app/models/sanitizable.rb
@@ -1,7 +1,7 @@
# coding: utf-8
# not sure about best place to put this class...

module Satanizable
module Sanitizable

Accents = { ['á','à','â','ä','ã','Ã','Ä','Â','À'] => 'a',
['é','è','ê','ë','Ë','É','È','Ê'] => 'e',
Expand Down
@@ -1,15 +1,15 @@
# coding: utf-8
require 'spec_helper'

describe Satanizable, " an object with this module" do
describe Sanitizable, " an object with this module" do

it "should respond to #satanized_title" do
Object.new.extend(Satanizable).should respond_to("remove_accents")
Object.new.extend(Sanitizable).should respond_to("remove_accents")
end

it 'should have a sanitized name attribute' do
object = Object.new
object.extend(Satanizable)
object.extend(Sanitizable)
object.remove_accents('Un joli nom accentué').should == 'un joli nom accentue'
end
end
Expand Down

0 comments on commit 4779a1f

Please sign in to comment.