brainspec/enumerize — pull request #118 by cesarjr (2013-11-20 23:02:14+00:00)
Title: Fix use of rspec with spork eliminating Gemfile sequence dependence

I'm trying to use enumerize matcher in rspec + spork and I'm receiving the following error message:

Failure/Error: should enumerize(:uf)
NoMethodError:
undefined method `enumerize' for #

If I disable spork the spec pass.

I think the problem is that rspec cannot find the matcher.

If I put the line above at spec_helper everything pass again:

require "enumerize/integrations/rspec"

This is my entire spec_helper:
https://gist.github.com/cesarjr/7571792#file-spec_helper-rb

I was reading the Enumerize code and I found theses lines:

https://github.com/brainspec/enumerize/blob/master/lib/enumerize.rb

if defined?(::RSpec)
require 'enumerize/integrations/rspec'
end

So... I checked my Gemfile and I notice that Enumerize was being declared before rspec.Like this:

gem "enumerize", "0.7.0"
gem "rspec-rails", "2.14.0"

I inverted and everything passed.

My question is: this dependency of Gemfile declaration sequence is expected?

Wouldn't be better if require 'enumerize/integrations/rspec' always happen?