Factlink / pavlov

Provides a Command/Query/Interactor framework.
MIT License
22 stars 4 forks source link

Added regression tests to Pavlov, to make sure we do not break too much. #74

Closed jjoos closed 10 years ago

jjoos commented 10 years ago

There are still 6 tests breaking, since we're updating Factlink to be compatible with Pavlov:master

marten commented 10 years ago

The Interactors, Commands and Queries modules aren't stubbed constants, and thus they aren't cleared between tests.

jjoos commented 10 years ago

@marten What's the best way to make sure those constant's are cleared between tests?

marten commented 10 years ago

What I've been doing in the other integration tests is something like:

before do
  stub_const 'Interactors', Module.new do
    class CreateActivity
      include Pavlov::Command
    end
  end
end

That way RSpec cleans up your stubbed class and nothing is shared between tests.

marten commented 10 years ago

Rubocop doesn't like your code style, but once you fix those you can merge it in as far as I'm concerned.