Sha256: d8bfa9173b2390c5bd256188133c65ba4955a73cd9aaf9525b10f9b53af5bc43

Contents?: true

Size: 1.12 KB

Versions: 16

Compression:

Stored size: 1.12 KB

Contents

require File.expand_path(
    File.join(File.dirname(__FILE__), %w[.. lib loquacious]))

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

  config.before :each do
    table = Loquacious::Configuration.instance_variable_get(:@table)
    table.clear

    Loquacious.configuration_for('specs') do
      first   'foo', :desc => 'foo method'
      second  'bar', :desc => 'bar method'

      desc 'the third group'
      third {
        answer 42, :desc => 'life the universe and everything'
        question :symbol, :desc => 'perhaps you do not understand'
      }
    end
  end
end

class StringIO
  alias :_readline :readline
  def readline
    @pos ||= 0
    seek @pos
    line = _readline
    @pos = tell
    return line
  rescue EOFError
    nil
  end

  def clear
    @pos = 0
    seek 0
    truncate 0
  end

  def to_s
    @pos = tell
    seek 0
    str = read
    seek @pos
    return str
  end
end

# EOF

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
TwP-loquacious-1.0.0 spec/spec_helper.rb
TwP-loquacious-1.1.0 spec/spec_helper.rb
TwP-loquacious-1.1.1 spec/spec_helper.rb
TwP-loquacious-1.3.0 spec/spec_helper.rb
loquacious-1.5.2 spec/spec_helper.rb
loquacious-1.5.1 spec/spec_helper.rb
loquacious-1.5.0 spec/spec_helper.rb
loquacious-1.4.2 spec/spec_helper.rb
loquacious-1.4.1 spec/spec_helper.rb
loquacious-1.4.0 spec/spec_helper.rb
loquacious-1.3.1 spec/spec_helper.rb
loquacious-1.1.1 spec/spec_helper.rb
loquacious-1.1.0 spec/spec_helper.rb
loquacious-1.0.0 spec/spec_helper.rb
loquacious-1.2.0 spec/spec_helper.rb
loquacious-1.3.0 spec/spec_helper.rb