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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/micronaut/configuration.rb +15 -12
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
3
3
  require 'rubygems/specification'
4
4
 
5
5
  GEM = "micronaut"
6
- GEM_VERSION = "0.1.7.2"
6
+ GEM_VERSION = "0.1.7.3"
7
7
  AUTHOR = "Chad Humphries"
8
8
  EMAIL = "chad@spicycode.com"
9
9
  HOMEPAGE = "http://spicycode.com"
@@ -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 = case make_a_mockery_with
45
- when :mocha
46
- require 'micronaut/mocking/with_mocha'
47
- Micronaut::Mocking::WithMocha
48
- when :rr
49
- require 'micronaut/mocking/with_rr'
50
- Micronaut::Mocking::WithRR
51
- else
52
- require 'micronaut/mocking/with_absolutely_nothing'
53
- Micronaut::Mocking::WithAbsolutelyNothing
54
- end
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, mock_framework)
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.2
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-28 00:00:00 -08:00
12
+ date: 2008-12-29 00:00:00 -08:00
13
13
  default_executable: micronaut
14
14
  dependencies: []
15
15