spicycode-micronaut 0.2.1.4 → 0.2.1.5

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/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems/specification'
4
4
  require 'lib/micronaut/rake_task'
5
5
 
6
6
  GEM = "micronaut"
7
- GEM_VERSION = "0.2.1.4"
7
+ GEM_VERSION = "0.2.1.5"
8
8
  AUTHOR = "Chad Humphries"
9
9
  EMAIL = "chad@spicycode.com"
10
10
  HOMEPAGE = "http://github.com/spicycode/micronaut"
@@ -10,11 +10,18 @@ describe Micronaut::Configuration do
10
10
  Micronaut.configuration.mock_with :mocha
11
11
  end
12
12
 
13
- it "should include the do absolutely nothing mocking adapter for all other cases" do
13
+ it "should include the null adapter for nil" do
14
14
  Micronaut::Behaviour.expects(:send).with(:include, Micronaut::Mocking::WithAbsolutelyNothing)
15
- Micronaut.configuration.mock_with
15
+ Micronaut.configuration.mock_with nil
16
16
  end
17
-
17
+
18
+ # if the below example doesn't pass, @behaviour_instance._setup_mocks and similiar calls fail without a mock library specified
19
+ # this is really a case where cucumber would be a better fit to catch these type of regressions
20
+ it "should include the null adapter by default, if no mocking library is specified" do
21
+ Micronaut::Behaviour.expects(:send).with(:include, Micronaut::Mocking::WithAbsolutelyNothing)
22
+ config = Micronaut::Configuration.new
23
+ end
24
+
18
25
  end
19
26
 
20
27
  describe "#include" do
@@ -13,7 +13,8 @@ module Micronaut
13
13
  # Modules that will be included or extended based on given filters
14
14
  attr_reader :include_or_extend_modules
15
15
 
16
- # Run all examples if the run is filtered, and no examples were found - defaults to true
16
+ # Run all examples if the run is filtered, and no examples were found. Normally this is what you want -
17
+ # when using focused examples for instance. Defaults to true
17
18
  attr_accessor :run_all_when_everything_filtered
18
19
 
19
20
  # Enable profiling of example run - defaults to false
@@ -34,6 +35,7 @@ module Micronaut
34
35
  @include_or_extend_modules = []
35
36
  @formatter_to_use = Micronaut::Formatters::ProgressFormatter
36
37
  @filter = nil
38
+ mock_with nil unless @mock_framework_established
37
39
  end
38
40
 
39
41
  # E.g. alias_example_to :crazy_slow, :speed => 'crazy_slow' defines
@@ -47,6 +49,7 @@ module Micronaut
47
49
  end
48
50
 
49
51
  def mock_with(make_a_mockery_with=nil)
52
+ @mock_framework_established = true
50
53
  @mock_framework = make_a_mockery_with
51
54
  mock_framework_class = case make_a_mockery_with.to_s
52
55
  when /mocha/i
@@ -67,6 +70,7 @@ module Micronaut
67
70
  Micronaut::Runner.autorun
68
71
  end
69
72
 
73
+ # Turn ANSI on with 'true', or off with 'false'
70
74
  def color_enabled=(on_or_off)
71
75
  @color_enabled = on_or_off
72
76
  end
@@ -1,8 +1,8 @@
1
1
  module Micronaut
2
2
  module KernelExtensions
3
3
 
4
- def describe(*args, &describe_block)
5
- Micronaut::Behaviour.describe(*args, &describe_block)
4
+ def describe(*args, &behaviour_block)
5
+ Micronaut::Behaviour.describe(*args, &behaviour_block)
6
6
  end
7
7
 
8
8
  end
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.2.1.4
4
+ version: 0.2.1.5
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: 2009-01-16 00:00:00 -08:00
12
+ date: 2009-01-20 00:00:00 -08:00
13
13
  default_executable: micronaut
14
14
  dependencies: []
15
15