Sha256: 6d109d099645d8aebefdbfc1cf5bca6eaede112df7db8bf6b076bb2e4a918460

Contents?: true

Size: 858 Bytes

Versions: 43

Compression:

Stored size: 858 Bytes

Contents

# Equivalent to a header guard in C/C++
# Used to prevent the spec helper from being loaded more than once
unless defined? BONES_SPEC_HELPER
BONES_SPEC_HELPER = true

require 'stringio'
require File.expand_path(
    File.join(File.dirname(__FILE__), %w[.. lib bones]))

Spec::Runner.configure do |config|
  # == Mock Framework
  #
  # RSpec uses it's own mocking framework by default. If you prefer to
  # use mocha, flexmock or RR, uncomment the appropriate line:
  #
  # config.mock_with :mocha
  # config.mock_with :flexmock
  # config.mock_with :rr
end

class StringIO
  alias :_readline :readline
  def readline
    @_pos ||= 0
    seek @_pos
    begin
      _line = _readline
      @_pos = tell
      _line.rstrip
    rescue EOFError
      nil
    end
  end

  def clear
    truncate 0
    seek 0
    @_pos = 0
  end
end

end  # unless defined?

# EOF

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
TwP-bones-2.3.0 spec/spec_helper.rb
TwP-bones-2.4.0 spec/spec_helper.rb
TwP-bones-2.4.1 spec/spec_helper.rb
TwP-bones-2.4.2 spec/spec_helper.rb
TwP-bones-2.5.0 spec/spec_helper.rb
TwP-bones-2.5.1 spec/spec_helper.rb
bones-3.7.0 spec/spec_helper.rb
bones-3.6.5 spec/spec_helper.rb
bones-3.6.4 spec/spec_helper.rb
bones-3.6.2 spec/spec_helper.rb
bones-3.6.1 spec/spec_helper.rb
bones-3.6.0 spec/spec_helper.rb
bones-3.5.5 spec/spec_helper.rb
bones-3.5.4 spec/spec_helper.rb
bones-3.5.3 spec/spec_helper.rb
bones-3.5.2 spec/spec_helper.rb
bones-3.5.1 spec/spec_helper.rb
bones-3.5.0 spec/spec_helper.rb
bones-3.4.7 spec/spec_helper.rb
bones-3.4.6 spec/spec_helper.rb