Permalink
Browse files

+ now uses rig/rspec

  • Loading branch information...
1 parent 697e37d commit a26e237f91ec6dee28a87a1713924751ee3f609d @kschiess committed Jan 2, 2011
Showing with 11 additions and 22 deletions.
  1. +1 −1 Gemfile
  2. +8 −3 Gemfile.lock
  3. +2 −18 spec/wt/parser_spec.rb
View
@@ -1,6 +1,6 @@
source "http://rubygems.org"
-gem 'parslet', '~> 1.0'
+gem 'parslet', :git => 'git://github.com/kschiess/parslet'
group :development do
gem 'rspec', '~> 2'
View
@@ -1,11 +1,16 @@
+GIT
+ remote: git://github.com/kschiess/parslet
+ revision: c140a7b5f04cafaf23cad29c6e7c9656777063d1
+ specs:
+ parslet (1.1.0)
+ blankslate (~> 2.1.2.3)
+
GEM
remote: http://rubygems.org/
specs:
blankslate (2.1.2.3)
diff-lcs (1.1.2)
flexmock (0.8.11)
- parslet (1.0.0)
- blankslate (~> 2.1.2.3)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
@@ -20,5 +25,5 @@ PLATFORMS
DEPENDENCIES
flexmock
- parslet (~> 1.0)
+ parslet!
rspec (~> 2)
View
@@ -1,26 +1,10 @@
require 'spec_helper'
+require 'parslet/rig/rspec'
+
describe Wt::Parser do
let(:parser) { described_class.new }
- RSpec::Matchers.define :parse do |exp|
- match do |parser|
- begin
- parser.parse(exp)
- true
- rescue Parslet::ParseFailed
- false
- end
- end
- failure_message_for_should do |parser|
- begin
- parser.parse(exp)
- rescue Parslet::ParseFailed => b
- parser.error_tree.to_s
- end
- end
- end
-
context "simple arithmetic expressions" do
subject { parser.expression }
it { should parse("1+2") }

0 comments on commit a26e237

Please sign in to comment.