spec/rails/ucblit/logging_spec.rb in berkeley_library-logging-0.2.5 vs spec/rails/ucblit/logging_spec.rb in berkeley_library-logging-0.2.6
- old
+ new
@@ -23,21 +23,21 @@
end
mock_logger_class.new
end
- before(:each) do
+ before do
@rails_logger_orig = Rails.logger
Rails.logger = new_mock_logger
if (@logger_was_defined = logger_defined?)
@logging_logger_orig = Logging.instance_variable_get(:@logger)
undefine_logger!
end
end
- after(:each) do
+ after do
@logger_was_defined ? reset_logger! : undefine_logger!
Rails.logger = @rails_logger_orig
end
describe 'class methods' do
@@ -72,10 +72,10 @@
end
describe 'included' do
attr_reader :logificator
- before(:each) do
+ before do
@logificator = Object.new
@logificator.singleton_class.include(Logging)
end
describe :logger do