From 66104951fe0e4ebbfd9d5b24856b3557f724f450 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Fri, 11 Jul 2008 14:40:28 -0700 Subject: [PATCH] Updated MSpec source to 46e80081. --- mspec/Rakefile | 3 ++- mspec/lib/mspec/runner/context.rb | 4 ++-- mspec/lib/mspec/version.rb | 2 +- mspec/{Rakefile => mspec-1.3.1.gemspec} | 17 +++-------------- mspec/spec/runner/context_spec.rb | 6 ++++++ 5 files changed, 14 insertions(+), 18 deletions(-) copy mspec/{Rakefile => mspec-1.3.1.gemspec} (83%) diff --git a/mspec/Rakefile b/mspec/Rakefile index 955c7cd6e..f6303cc58 100644 --- a/mspec/Rakefile +++ b/mspec/Rakefile @@ -1,6 +1,7 @@ require 'rubygems' require 'spec/rake/spectask' require 'rake/gempackagetask' +require 'lib/mspec/version' Spec::Rake::SpecTask.new @@ -9,7 +10,7 @@ task :default => :spec spec = Gem::Specification.new do |s| s.name = %q{mspec} - s.version = "1.3.0" + s.version = MSpec::VERSION s.specification_version = 2 if s.respond_to? :specification_version= diff --git a/mspec/lib/mspec/runner/context.rb b/mspec/lib/mspec/runner/context.rb index bebf5075a..4f021f976 100644 --- a/mspec/lib/mspec/runner/context.rb +++ b/mspec/lib/mspec/runner/context.rb @@ -73,10 +73,10 @@ class ContextState if protect("before :each", @before) MSpec.clear_expectations - protect nil, spec + passed = protect nil, spec if spec MSpec.actions :example, state, spec - protect nil, @expectation_missing unless MSpec.expectation? + protect nil, @expectation_missing unless MSpec.expectation? or not passed end protect "after :each", @after protect "Mock.verify_count", @mock_verify diff --git a/mspec/lib/mspec/version.rb b/mspec/lib/mspec/version.rb index 38b1f1567..0a75f115b 100644 --- a/mspec/lib/mspec/version.rb +++ b/mspec/lib/mspec/version.rb @@ -1,3 +1,3 @@ module MSpec - VERSION = '1.3.0' + VERSION = '1.3.1' end diff --git a/mspec/Rakefile b/mspec/mspec-1.3.1.gemspec similarity index 83% copy from mspec/Rakefile copy to mspec/mspec-1.3.1.gemspec index 955c7cd6e..5bf371c36 100644 --- a/mspec/Rakefile +++ b/mspec/mspec-1.3.1.gemspec @@ -1,15 +1,6 @@ -require 'rubygems' -require 'spec/rake/spectask' -require 'rake/gempackagetask' - -Spec::Rake::SpecTask.new - -task :default => :spec - - -spec = Gem::Specification.new do |s| +Gem::Specification.new do |s| s.name = %q{mspec} - s.version = "1.3.0" + s.version = "1.3.1" s.specification_version = 2 if s.respond_to? :specification_version= @@ -39,6 +30,4 @@ EOS s.rdoc_options << '--title' << 'MSpec Gem' << '--main' << 'README' << '--line-numbers' -end - -Rake::GemPackageTask.new(spec){ |pkg| pkg.gem_spec = spec } +end \ No newline at end of file diff --git a/mspec/spec/runner/context_spec.rb b/mspec/spec/runner/context_spec.rb index fba7d0383..cc25e9176 100644 --- a/mspec/spec/runner/context_spec.rb +++ b/mspec/spec/runner/context_spec.rb @@ -231,6 +231,12 @@ describe ContextState, "#process" do @state.process ScratchPad.recorded.should be_nil end + + it "does not raise an ExpectationNotFoundError if the #it block causes a failure" do + @state.it("it") { raise Exception, "Failed!" } + @state.process + ScratchPad.recorded.should be_nil + end end describe ContextState, "#process" do -- 2.11.4.GIT