spec/standalone/ucblit/logging_spec.rb in berkeley_library-logging-0.2.5 vs spec/standalone/ucblit/logging_spec.rb in berkeley_library-logging-0.2.6
- old
+ new
@@ -23,11 +23,11 @@
end
mock_logger_class.new
end
- before(:each) do
+ before do
if (@logger_was_defined = logger_defined?)
@logging_logger_orig = Logging.instance_variable_get(:@logger)
undefine_logger!
end
@@ -35,11 +35,11 @@
# test simpler, we mock it to always return the same object
persistent_default_logger = new_mock_logger
allow(Logging::Loggers).to receive(:default_logger).and_return(persistent_default_logger)
end
- after(:each) do
+ after do
@logger_was_defined ? reset_logger! : undefine_logger!
end
describe 'class methods' do
describe :logger do
@@ -73,10 +73,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