aliases clean methods as ! variants since they are rather destructive -thanks nofxx :)

This commit is contained in:
Ben Mabey 2010-02-26 15:21:40 -07:00
parent 08fef6fe17
commit f6ee1fc0bf
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,8 @@
0.5.x (In Git)
=== New features
* clean and clean_with methods are now aliased to clean! and clean_with!. (Ben Mabey)
== 0.5.0 2010-02-22 - The CouchPotato Release
=== New features

View File

@ -41,6 +41,8 @@ module DatabaseCleaner
strategy
end
alias clean_with! clean_with
def strategy=(args)
strategy, *strategy_args = args
if strategy.is_a?(Symbol)
@ -64,6 +66,8 @@ module DatabaseCleaner
strategy.clean
end
alias clean! clean
private
def strategy