Browse files

Remove const only when defined.

  • Loading branch information...
1 parent 1c6795e commit 4d58dd50fddc868eb92464adc88c4891c4a3297f @netzpirat netzpirat committed Jun 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 spec/guard/hook_spec.rb
View
2 spec/guard/hook_spec.rb
@@ -8,7 +8,7 @@
after { described_class.reset_callbacks! }
- after(:all) { ::Guard.instance_eval { remove_const(:Dummy) } }
+ after(:all) { ::Guard.instance_eval { remove_const(:Dummy) if defined?(::Dummy) } }
describe "--module methods--" do
before { described_class.add_callback(listener, guard_class, :start_begin) }

0 comments on commit 4d58dd5

Please sign in to comment.