Open erikaxel opened 7 years ago
I have the same issue
EDIT: @erikaxel I think it is because controller testing is deprecated - controller_for
method always returns nil
@erikaxel
Workaround for the moment is
let(:controller) { double('controller', url_options: {}) }
I found that it depends on the order you put cells-rails
and rspec-cells
into the Gemfile.
If cells-rails
goes first then it works, if it's after rspec-cells
then it doesn't
Which indicates that rspec-cells
has an implied dependency on cells-rails
.
The order in the Gemfile matters? :fearful:
I actually had same issue, and found out that when initializing cell object like this:
let(:cell_obj) { SomeCell.(data) }
then it does not work properly, but when I initialize it as
let(:cell_obj) { cell(SomeCell, data) }
then everything works. Maybe that's also the case for you @erikaxel
Hi,
Im getting a NoMethodError: undefined method `[]' for nil:NilClass in rspec-testing when using path helpers. I have included the controller via the controller-method, and tried setting the type to :cell, but it doesn't help. Using Rails 5.1 and Slim.