May 9, 2015

rspec error messages

If you get this:

`require_relative': cannot load such file -- path (LoadError)


Do this:

Double-check that the files referenced by all your "require_relative" exist.
Also check that the spelling is correct and matches both ways.

If you get this:

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead.


Do this:

Replace "@book.should be_an_instance_of Book" with:

expect(@book).to be_an_instance_of Book

This is due to deprecation of the "should" syntax.

No comments:

Post a Comment