empezar 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/empezar/log.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module Empezar
2
2
  class Log
3
3
  include Singleton
4
+ @@logger = nil
4
5
 
5
6
  def self.instance
6
7
  @@logger
@@ -1,3 +1,3 @@
1
1
  module Empezar
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/spec/log_spec.rb CHANGED
@@ -1,14 +1,26 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Log do
4
- it 'should redirect random calls to the instance of Empezar::Log' do
5
- Empezar::Log.instance.should_receive :hola
6
- Log.hola
4
+ context 'the call matches an existing method of an ancestor of Log' do
5
+ it 'should not redirect it' do
6
+ allow_message_expectations_on_nil
7
+ Empezar::Log.instance.should_not_receive :should_receive
8
+ Log.should_receive :a
9
+ Log.a
10
+ end
11
+ end
12
+
13
+ context 'the call matches nothing' do
14
+ it 'should redirect random calls to the instance of Empezar::Log' do
15
+ allow_message_expectations_on_nil
16
+ Empezar::Log.instance.should_receive :hola
17
+ Log.hola
7
18
 
8
- Empezar::Log.instance.should_receive :aaaaaaaa
9
- Log.aaaaaaaa
19
+ Empezar::Log.instance.should_receive :aaaaaaaa
20
+ Log.aaaaaaaa
10
21
 
11
- Empezar::Log.instance.should_receive(:oo=).with "hola"
12
- Log.oo = "hola"
22
+ Empezar::Log.instance.should_receive(:oo=).with "hola"
23
+ Log.oo = "hola"
24
+ end
13
25
  end
14
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: empezar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-03 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: symbolmatrix
@@ -124,3 +124,4 @@ test_files:
124
124
  - spec/log_spec.rb
125
125
  - spec/runner_spec.rb
126
126
  - spec/spec_helper.rb
127
+ has_rdoc: