spicycode-micronaut 0.1.7.2 → 0.1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/micronaut/configuration.rb +15 -12
- metadata +2 -2
data/Rakefile
CHANGED
@@ -19,6 +19,8 @@ module Micronaut
|
|
19
19
|
# Enable profiling of example run - defaults to false
|
20
20
|
attr_accessor :profile_examples
|
21
21
|
|
22
|
+
attr_reader :mock_framework
|
23
|
+
|
22
24
|
def initialize
|
23
25
|
@backtrace_clean_patterns = [/\/lib\/ruby\//, /bin\/rcov:/, /vendor\/rails/, /bin\/micronaut/, /#{::Micronaut::InstallDirectory}/]
|
24
26
|
@profile_examples = false
|
@@ -41,19 +43,20 @@ module Micronaut
|
|
41
43
|
end
|
42
44
|
|
43
45
|
def mock_with(make_a_mockery_with=nil)
|
44
|
-
mock_framework =
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
@mock_framework = make_a_mockery_with
|
47
|
+
mock_framework_class = case make_a_mockery_with.to_s
|
48
|
+
when /mocha/i
|
49
|
+
require 'micronaut/mocking/with_mocha'
|
50
|
+
Micronaut::Mocking::WithMocha
|
51
|
+
when /rr/i
|
52
|
+
require 'micronaut/mocking/with_rr'
|
53
|
+
Micronaut::Mocking::WithRR
|
54
|
+
else
|
55
|
+
require 'micronaut/mocking/with_absolutely_nothing'
|
56
|
+
Micronaut::Mocking::WithAbsolutelyNothing
|
57
|
+
end
|
55
58
|
|
56
|
-
Micronaut::Behaviour.send(:include,
|
59
|
+
Micronaut::Behaviour.send(:include, mock_framework_class)
|
57
60
|
end
|
58
61
|
|
59
62
|
def autorun!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spicycode-micronaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.7.
|
4
|
+
version: 0.1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Humphries
|
@@ -9,7 +9,7 @@ autorequire: micronaut
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-29 00:00:00 -08:00
|
13
13
|
default_executable: micronaut
|
14
14
|
dependencies: []
|
15
15
|
|