Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Spork breaks Configatron gem, unable to run tests with coverage support #67

Burgestrand opened this Issue · 3 comments

3 participants


I use Spork for BDD purposes, and along with that I also use cover_me (which in turn uses configatron for configuration). My tests prematurely abort with an exception saying “at_exit” was a protected parameter so I did some digging.

Configatron checks existing methods to make sure configuration keys don’t overlap. Spork overrides #at_exit, essentially making methods_include?(:at_exit) in Configatron return true (which it should not). This becomes an issue when cover_me tries to set a default value for #at_exit configuration value, resulting in a ProtectedParameter exception.

I’m not even sure which gem to adress this issue to. I did try to fix it in Spork, but eventually it lead me to monkey patch the cover_me out of frustration instead.


What was the monkey patch you used as a workaround?


I’m terribly sorry, it was very bad of me to forget to include the mentioned monkey patch. I do not remember what the monkey patch was. I did look at it again, however, and believe something like this might work:

class Configatron
  class Store
    alias_method :orig_methods_include?, :methods_include?
    def methods_include?(name)
      return false if name.to_s == "at_exit"

Do note that this is untested, but I believe it might work.

@belt belt referenced this issue in markbates/cover_me

cover_me breaks passenger standalone #31


Spork has nothing to do with this issue. I do not use spork and experience the same symptoms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.