spec/logger_spec.rb in alephant-logger-0.0.2 vs spec/logger_spec.rb in alephant-logger-0.1.0
- old
+ new
@@ -2,13 +2,13 @@
describe Alephant::Logger do
describe ".get_logger" do
context "no logger set" do
- it "returns standard Logger" do
- expect(subject.get_logger).to be_a Logger
- end
+ specify {
+ expect(subject.get_logger.logger).to be_a Logger
+ }
end
context "subject.set_logger(:foo)" do
it "returns @@logger" do
subject.class_variable_set(:@@logger, :foo)
@@ -18,11 +18,11 @@
end
describe ".set_logger(:foo)" do
it "sets foo as @@logger" do
subject.set_logger(:bar)
- expect(subject.class_variable_get(:@@logger)).to eq(:bar)
+ expect(subject.class_variable_get(:@@logger).logger).to eq :bar
end
end
context "when included in a class" do
@@ -35,10 +35,10 @@
end
context "called via '#logger'" do
it "returns the value of @@logger" do
subject.class_variable_set(:@@logger, :baz)
- expect(IncludesLog.new.calls_logger).to eq(:baz)
+ expect(IncludesLog.new.calls_logger).to eq :baz
end
end
end
end