Sha256: a717475dd52da7b783d3fddd2973604b68c02fc51821996d813ebb617d0416f3

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Spec
  module DSL
    describe Example, " class" do

      def run(example)
        example.run(@reporter, nil, nil, nil, Object.new)
      end

      before do
        @reporter = stub("reporter", :example_started => nil, :example_finished => nil)
        @example_class = Example.dup
      end
      
      it "should report errors in example" do
        error = Exception.new
        example = @example_class.new("example") {raise(error)}
        @reporter.should_receive(:example_finished).with(equal(example), error, "example", false)
        run(example)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-1.0.6 spec/spec/dsl/example_class_spec.rb
rspec-1.0.7 spec/spec/dsl/example_class_spec.rb
rspec-1.0.8 spec/spec/dsl/example_class_spec.rb