jasmine / jasmine-gem

Jasmine ruby gem
682 stars 274 forks source link

CSS file found instead of JS file #295

Closed GCorbel closed 6 years ago

GCorbel commented 6 years ago

I have a project with two files named redactor.css and redactor.js. When I try to load redactor.js it founds redactor.css.

I think this is because of this line. When I do Jasmine::AssetExpander::Rails4Or5AssetBundle.new.send(:context). assets_environment.find_asset('redactor'), it find the CSS file but if I search "redactor.js" it works.

I think it's better to search redactor.js first and redactor only if nothing is found.

What you think?

slackersoft commented 6 years ago

My best guess is this was necessary, at least sometimes, in older version of Rails. I would be happy to review a pull request that first checks for the full name with extension and only checks for an extensionless version if nothing from the first is returned.