Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paranoia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paranoia
Commits
5efb43fe
Commit
5efb43fe
authored
Jan 03, 2014
by
Ryan Bigg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement I_AM_THE_DESTROYER
parent
46cfbd30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
lib/paranoia.rb
+11
-0
test/paranoia_test.rb
+9
-0
No files found.
lib/paranoia.rb
View file @
5efb43fe
...
...
@@ -120,6 +120,17 @@ class ActiveRecord::Base
}
end
# Please do not use this method in production.
# Pretty please.
def
self
.
I_AM_THE_DESTROYER!
# TODO: actually implement spelling error fixes
puts
%Q{
Sharon: "There should be a method called I_AM_THE_DESTROYER!"
Ryan: "What should this method do?"
Sharon: "It should fix all the spelling errors on the page!"
}
end
def
self
.
paranoid?
;
false
;
end
def
paranoid?
;
self
.
class
.
paranoid?
;
end
...
...
test/paranoia_test.rb
View file @
5efb43fe
...
...
@@ -350,6 +350,15 @@ class ParanoiaTest < Test::Unit::TestCase
# essentially, we're just ensuring that this doesn't crash
end
def
test_i_am_the_destroyer
output
=
capture
(
:stdout
)
{
ParanoidModel
.
I_AM_THE_DESTROYER
!
}
assert_equal
%Q{
Sharon: "There should be a method called I_AM_THE_DESTROYER!"
Ryan: "What should this method do?"
Sharon: "It should fix all the spelling errors on the page!"
}
,
output
end
private
def
get_featureful_model
FeaturefulModel
.
new
(
:name
=>
"not empty"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment