Upgrade to RSpec 3.0.

For this I've enabled both the old expectation and stubbing/mocking syntax. The
old syntax is much more compact and to me reads nicer. For example, consider
the following:

    lex('<foo></foo>').should == [...]

To me this reads much nicer than this:

    expect(lex('<foo></foo>')).to eq([...])
This commit is contained in:
Yorick Peterse 2014-06-02 12:09:38 +02:00
parent 1d2f9e6db6
commit 114bc0d6e8
2 changed files with 9 additions and 1 deletions

View File

@ -37,7 +37,7 @@ Gem::Specification.new do |s|
s.add_dependency 'ast' s.add_dependency 'ast'
s.add_development_dependency 'rake' s.add_development_dependency 'rake'
s.add_development_dependency 'rspec' s.add_development_dependency 'rspec', ['~> 3.0']
s.add_development_dependency 'yard' s.add_development_dependency 'yard'
s.add_development_dependency 'simplecov' s.add_development_dependency 'simplecov'
s.add_development_dependency 'kramdown' s.add_development_dependency 'kramdown'

View File

@ -11,4 +11,12 @@ require_relative 'support/parsing'
RSpec.configure do |config| RSpec.configure do |config|
config.color = true config.color = true
config.include Oga::ParsingHelpers config.include Oga::ParsingHelpers
config.expect_with :rspec do |c|
c.syntax = [:should, :expect]
end
config.mock_with :rspec do |c|
c.syntax = [:should, :expect]
end
end end