micro_mock 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -44,6 +44,9 @@ assert_equal 5, count # Test::Unit
44
44
  count.should eq 5 # RSpec
45
45
  ```
46
46
 
47
+ Of course you wouldn't normally test the mock itself... rather the code that uses the mock.
48
+ I'll work on adding some real world examples.
49
+
47
50
  ```ruby
48
51
  # create a mock that subclasses Array
49
52
  Mock = MicroMock.make(Array)
@@ -54,6 +57,3 @@ list.stub :say_hi do |name|
54
57
  end
55
58
  list.say_hi "Nate" # => "Hi Nate!"
56
59
  ```
57
-
58
- Of course you wouldn't normally test the mock itself... rather the code that uses the mock.
59
- I'll work on adding some real world examples.
@@ -1,3 +1,3 @@
1
1
  module MicroMock
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/micro_mock.rb CHANGED
@@ -66,6 +66,7 @@ module MicroMock
66
66
  klass ||= Class.new
67
67
  klass.extend MicroMock
68
68
  klass.send :include, MicroMock
69
+ Object.const_set "MicroMock#{klass.object_id}", klass
69
70
  klass
70
71
  end
71
72
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micro_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-11-15 00:00:00.000000000 Z
12
+ date: 2012-11-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' MicroMock might just be the lightest mocking strategy available.
15
15