Sha256: 6da1d1ce34cede23c41f66dd0f136dfbc92b5def51f65fe009387bbdc19db50a

Contents?: true

Size: 732 Bytes

Versions: 40

Compression:

Stored size: 732 Bytes

Contents

module Spec
  module Example
    class ExamplePendingError < StandardError
      attr_reader :pending_caller

      def initialize(message=nil)
        super
        @pending_caller = caller[2]
      end
    end
    
    class NotYetImplementedError < ExamplePendingError
      MESSAGE = "Not Yet Implemented"
      RSPEC_ROOT_LIB = File.expand_path(File.dirname(__FILE__) + "/../..")
      
      def initialize(backtrace)
        super(MESSAGE)
        @pending_caller = pending_caller_from(backtrace)
      end
      
    private
      
      def pending_caller_from(backtrace)
        backtrace.detect {|line| !line.include?(RSPEC_ROOT_LIB) }
      end
    end

    class PendingExampleFixedError < StandardError; end
  end
end

Version data entries

40 entries across 40 versions & 8 rubygems

Version Path
dchelimsky-rspec-1.1.10 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.1 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.2 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.3 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.4 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.5 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.6 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11.7 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.11 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.12 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.99.1 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.99.2 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.99.3 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.99.4 lib/spec/example/errors.rb
dchelimsky-rspec-1.1.99.5 lib/spec/example/errors.rb
newbamboo-evented-rspec-1.1.12 lib/spec/example/errors.rb
newbamboo-rspec-1.1.12 lib/spec/example/errors.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/example/errors.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/example/errors.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/example/errors.rb