Sha256: e2ea0a3c169d655739e05cdf40f3f4ef4c326a472f2580d0a4bbb1f00e183186

Contents?: true

Size: 680 Bytes

Versions: 3

Compression:

Stored size: 680 Bytes

Contents

# Gotchas

## Name conflicts with upstream dependencies

Examples in rspec-rails mix in Rails' assertion modules, which mix in assertion
libraries from Minitest (if available) or Test::Unit. This makes it easy to
accidentally override a method defined in one of those upstream modules in an
example.

For example, if you have a model named `Message`, and you define a `message`
method (using `def message` or `let(:message)` in an example group, it will
override Minitest's `message` method, which is used internally by Minitest, and
is also a public API of Minitest. In this case, you would need to use a
different method name or work with instance variables instead of methods.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.rc Gotchas.markdown
rspec-rails-2.0.0.beta.22 Gotchas.markdown
rspec-rails-2.0.0.beta.20 Gotchas.markdown