You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
undefined local variable or method `data' for #<#<Class:0x007f9913a97528>:0x007f99157d60f8>
Most of my scripts are .js.erb since I pull a lot of strings from Middleman data .yml files, so I have a lot of code like this:
var aString = "<%= data[:strings][:a_string] %>";
which works fine, except when running Jasmine-tests, as if Jasmine would not load Middleman data files. Is there a configuration setting where I can tell Jasmine to do so?
UPDATE:
It seems I also can't use Middleman helpers. I receive the same error when trying to use a Middleman helper defined in Middleman's config.rb file.
The text was updated successfully, but these errors were encountered:
erosdome
changed the title
Can't access Middleman data files
Can't access Middleman data files, helpers
Nov 7, 2016
Upon loading, I get:
Most of my scripts are .js.erb since I pull a lot of strings from Middleman data .yml files, so I have a lot of code like this:
which works fine, except when running Jasmine-tests, as if Jasmine would not load Middleman data files. Is there a configuration setting where I can tell Jasmine to do so?
UPDATE:
It seems I also can't use Middleman helpers. I receive the same error when trying to use a Middleman helper defined in Middleman's
config.rb
file.The text was updated successfully, but these errors were encountered: