diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:32 +0200 |
commit | b95d6e84b00bd926b1118f6a820eca7a870b8c35 (patch) | |
tree | 0753080f3b0dabbe0b2f62abe044c24d6b4ed5c4 /activesupport/lib/active_support/testing | |
parent | 36a84a4f15f29b41c7cac2f8de410055006a8a8d (diff) | |
download | rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.gz rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.bz2 rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/assertions.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/declarative.rb | 8 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/pending.rb | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb index 33793f0688..8c68f42781 100644 --- a/activesupport/lib/active_support/testing/assertions.rb +++ b/activesupport/lib/active_support/testing/assertions.rb @@ -63,14 +63,14 @@ module ActiveSupport def assert_no_difference(expression, message = nil, &block) assert_difference expression, 0, message, &block end - + # Test if an expression is blank. Passes if object.blank? is true. # # assert_blank [] # => true def assert_blank(object) assert object.blank?, "#{object.inspect} is not blank" end - + # Test if an expression is not blank. Passes if object.present? is true. # # assert_present {:data => 'x' } # => true diff --git a/activesupport/lib/active_support/testing/declarative.rb b/activesupport/lib/active_support/testing/declarative.rb index 70a6c2ca60..1c05d45888 100644 --- a/activesupport/lib/active_support/testing/declarative.rb +++ b/activesupport/lib/active_support/testing/declarative.rb @@ -1,10 +1,10 @@ module ActiveSupport module Testing module Declarative - + def self.extended(klass) klass.class_eval do - + unless method_defined?(:describe) def self.describe(text) class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 @@ -14,9 +14,9 @@ module ActiveSupport RUBY_EVAL end end - + end - end + end unless defined?(Spec) # test "verify something" do diff --git a/activesupport/lib/active_support/testing/pending.rb b/activesupport/lib/active_support/testing/pending.rb index 21134ff9e2..39d1f50125 100644 --- a/activesupport/lib/active_support/testing/pending.rb +++ b/activesupport/lib/active_support/testing/pending.rb @@ -25,13 +25,13 @@ module ActiveSupport failed = true end - flunk("<#{description}> did not fail.") unless failed + flunk("<#{description}> did not fail.") unless failed end caller[0] =~ (/(.*):(.*):in `(.*)'/) @@pending_cases << "#{$3} at #{$1}, line #{$2}" print "P" - + @@at_exit ||= begin at_exit do puts "\nPending Cases:" @@ -42,7 +42,7 @@ module ActiveSupport end end end - + end end end
\ No newline at end of file |