--- /dev/null
+---
+BUNDLE_BIN: bin
GEM
remote: https://rubygems.org/
specs:
- rspec (1.3.0)
+ diff-lcs (1.2.5)
+ rspec (3.1.0)
+ rspec-core (~> 3.1.0)
+ rspec-expectations (~> 3.1.0)
+ rspec-mocks (~> 3.1.0)
+ rspec-core (3.1.7)
+ rspec-support (~> 3.1.0)
+ rspec-expectations (3.1.2)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.1.0)
+ rspec-mocks (3.1.3)
+ rspec-support (~> 3.1.0)
+ rspec-support (3.1.2)
yard (0.5.8)
PLATFORMS
ruby
DEPENDENCIES
- rspec (= 1.3.0)
+ rspec (~> 3.1)
walrat!
yard
+++ /dev/null
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'autospec' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
-
-require 'rubygems'
-require 'bundler/setup'
-
-load Gem.bin_path('rspec', 'autospec')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'bundler' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('bundler', 'bundler')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'htmldiff' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('diff-lcs', 'htmldiff')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'ldiff' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('diff-lcs', 'ldiff')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'rspec' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('rspec-core', 'rspec')
+++ /dev/null
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'spec' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
-
-require 'rubygems'
-require 'bundler/setup'
-
-load Gem.bin_path('rspec', 'spec')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'yard-graph' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('yard', 'yard-graph')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'yardoc' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('yard', 'yardoc')
--- /dev/null
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'yri' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('yard', 'yri')
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('../spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe 'proc additions' do
it 'responds to "to_parseable", "parse" and "memoizing_parse"' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('../spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
# For more detailed specification of the RegexpParslet behaviour see
# regexp_parslet_spec.rb.
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('../spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe String do
describe '#to_class_name' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::AndPredicate do
subject { Walrat::AndPredicate.new('foo') }
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe 'creating a continuation wrapper exception' do
it 'complains if initialized with nil' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::Grammar do
describe '::rules' do
starting_symbol :expr # :expr is not defined
end
- expect do
- RoyGrammar.new.parse('foo')
- end.should raise_error(/no rule for key/)
+ expect { RoyGrammar.new.parse('foo') }.to raise_error(/no rule for key/)
end
it 'should be able to parse using a simple grammar (one rule)' do
end
it 'should complain if trying to set default skipping parslet more than once' do
- expect do
+ expect {
class SetSkipperTwice < Walrat::Grammar
skipping :first # fine
skipping :again # should raise here
end
- end.should raise_error(/default skipping parslet already set/)
+ }.to raise_error(/default skipping parslet already set/)
end
it 'should complain if passed nil' do
- expect do
+ expect {
class PassNilToSkipping < Walrat::Grammar
skipping nil
end
- end.should raise_error(ArgumentError, /nil rule_or_parslet/)
+ }.to raise_error(ArgumentError, /nil rule_or_parslet/)
end
it 'should be able to override default skipping parslet on a per-rule basis' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::MatchDataWrapper do
before do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::MemoizingCache::NoValueForKey do
it 'is a singleton' do
end
describe Walrat::MemoizingCache do
- it 'parses with memoizing turned on' do
- pending
- end
-
- it 'parses with memoizing turned off' do
- pending
- end
-
- specify 'parsing with memoization turned on is faster' do
- pending
- end
+ it 'parses with memoizing turned on'
+ it 'parses with memoizing turned off'
+ it 'parses faster with memoization turned on'
end
# left-recursion is enabled by code in the memoizer and elsewhere; keep the
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::Node do
- it 'has behavior' do
- pending
- end
+ it 'has behavior'
end
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::NotPredicate do
it 'complains on trying to parse a nil string' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParserState do
before do
it '"parsed" should complain if passed something that doesn\'t respond to the "line_end" and "column_end" messages' do
# line_end
- my_mock = mock('mock_which_does_not_implement_line_end', :null_object => true)
- my_mock.should_receive(:line_end).and_raise(NoMethodError)
- lambda { @state.parsed(my_mock) }.should raise_error(NoMethodError)
+ my_mock = double('Mock which does not implement #line_end').as_null_object
+ expect(my_mock).to receive(:line_end).and_raise(NoMethodError)
+ expect { @state.parsed(my_mock) }.to raise_error(NoMethodError)
# column_end
- my_mock = mock('mock_which_does_not_implement_column_end', :null_object => true)
- my_mock.should_receive(:column_end).and_raise(NoMethodError)
- lambda { @state.parsed(my_mock) }.should raise_error(NoMethodError)
+ my_mock = double('Mock which does not implement #column_end').as_null_object
+ expect(my_mock).to receive(:column_end).and_raise(NoMethodError)
+ expect { @state.parsed(my_mock) }.to raise_error(NoMethodError)
end
it '"skipped" should complain if passed something that doesn\'t respond to the "line_end" and "column_end" messages' do
# line_end
- my_mock = mock('mock_which_does_not_implement_line_end', :null_object => true)
- my_mock.should_receive(:line_end).and_raise(NoMethodError)
- lambda { @state.skipped(my_mock) }.should raise_error(NoMethodError)
+ my_mock = double('Mock which does not implement #line_end').as_null_object
+ expect(my_mock).to receive(:line_end).and_raise(NoMethodError)
+ expect { @state.skipped(my_mock) }.to raise_error(NoMethodError)
# column_end
- my_mock = mock('mock_which_does_not_implement_column_end', :null_object => true)
- my_mock.should_receive(:column_end).and_raise(NoMethodError)
- lambda { @state.skipped(my_mock) }.should raise_error(NoMethodError)
+ my_mock = double('Mock which does not implement #column_end').as_null_object
+ expect(my_mock).to receive(:column_end).and_raise(NoMethodError)
+ expect { @state.skipped(my_mock) }.to raise_error(NoMethodError)
end
it 'should be able to mix use of "parsed" and "skipped" methods' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParsletChoice do
before do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe 'using shorthand operators to combine String, Symbol and Regexp parsers' do
it 'should be able to chain a String and a Regexp together' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParsletMerge do
it 'should be able to compare for equality' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParsletOmission do
it 'raises if "parseable" argument is nil' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParsletRepetition do
it 'raises if "parseable" argument is nil' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ParsletSequence do
before do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::Parslet do
it 'complains if sent "parse" message' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::Predicate do
it 'raises an ArgumentError if initialized with nil' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::ProcParslet do
before do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::RegexpParslet do
before do
# Licensed under the terms of the BSD 2-clause license.
require 'pathname'
-require 'rubygems'
-require 'spec'
+require 'rspec'
module Walrat
module SpecHelper
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::StringEnumerator do
it 'raises an ArgumentError if initialized with nil' do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::StringParslet do
before do
# Copyright 2007-2014 Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.
-require File.expand_path('spec_helper', File.dirname(__FILE__))
+require 'spec_helper'
describe Walrat::SymbolParslet do
it 'should raise an ArgumentError if initialized with nil' do
# TODO: add 'docs' subdirectory, 'README.txt' when they're done
s.files = Dir['lib/**/*.rb']
- s.add_development_dependency 'rspec', '1.3.0'
+ s.add_development_dependency 'rspec', '~> 3.1'
s.add_development_dependency 'yard'
end