Skip to content
Browse files

Fix all specs failing in Ruby 1.8.7

  • Loading branch information...
1 parent 8641923 commit 046f0c1422dd92eda31e8a44343c472f3565d14a @johndouthat committed Mar 22, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 spec/spec_helper.rb
View
10 spec/spec_helper.rb
@@ -125,9 +125,11 @@ class ::LineItem < ActiveRecord::Base
end
config.after(:each) do
- Object.send(:remove_const, :Company)
- Object.send(:remove_const, :User)
- Object.send(:remove_const, :Order)
- Object.send(:remove_const, :LineItem)
+ class ::Object
+ remove_const :Company rescue nil
+ remove_const :User rescue nil
+ remove_const :Order rescue nil
+ remove_const :LineItem rescue nil
+ end
end
end

0 comments on commit 046f0c1

Please sign in to comment.
Something went wrong with that request. Please try again.