Skip to content

@controller in Sweeper is set to nil when running rspec controller test #31

Open
@nnattawat

Description

@nnattawat

I am in the process of upgrading rails 3.2 to 4.1.8. So, I add the gem to make the app running without changing any code. The observer and sweeper actually works fine when I did manual test. However, when I run rspec test, I got missing method error and @controller was nil.

I need to add @controller ||= ActionController::Base.new in my sweeper for the hot fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions