Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests breaking with tilt 2.0.10 #836

Merged
merged 2 commits into from Dec 15, 2019

Conversation

aerostitch
Copy link
Contributor

Hi,

Since upgrading to tilt 2.0.10 the test fail with the following error:

  1) Error:
Slim test suite::HTML tags::Attributes::Ruby attributes#test_0002_should render:
ArgumentError: unknown command 'a'
    (__TEMPLATE__):6:in `test'
    (__TEMPLATE__):6:in `__tilt_47336302970300'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `call'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `evaluate'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:109:in `render'
    /tmp/slim/test/literate/helper.rb:13:in `render'
    (eval):436:in `block (6 levels) in <class:LiterateTest>'

  2) Error:
Slim test suite::HTML tags::Attributes::Dynamic tags `*`#test_0001_should render:
NameError: undefined local variable or method `a_unless_current' for #<#<Class:0x0000561aafb97510>:0x0000561aafe192c0>
    (__TEMPLATE__):7:in `__tilt_47336302970300'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `call'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `evaluate'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:109:in `render'
    /tmp/slim/test/literate/helper.rb:13:in `render'
    (eval):492:in `block (6 levels) in <class:LiterateTest>'

  3) Error:
Slim test suite::Line indicators::Output `=`#test_0004_should render:
ArgumentError: unknown command 'a'
    (__TEMPLATE__):6:in `test'
    (__TEMPLATE__):6:in `__tilt_47336302970300'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `call'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:170:in `evaluate'
    /tmp/slim/vendor/bundle/ruby/2.5.0/gems/tilt-2.0.10/lib/tilt/template.rb:109:in `render'
    /tmp/slim/test/literate/helper.rb:13:in `render'
    (eval):149:in `block (5 levels) in <class:LiterateTest>'

This issue is explained in rtomayko/tilt#347 and a workaround is provided there too.
This PR implements that proposed workaround.

Thanks,
Joseph

@aerostitch
Copy link
Contributor Author

aerostitch commented Dec 15, 2019

The tests still fail for Rails but that's a totally separate issue.
I fixed a missing file that is now required with Sprockets 4 but that's as far as I can go for now.
Feel free to merge and treat the rails problem separately.
Thanks

@stonean stonean merged commit 3159a40 into slim-template:master Dec 15, 2019
@stonean
Copy link
Contributor

stonean commented Dec 15, 2019

Thank you @aerostitch!

@aerostitch aerostitch deleted the tilt20210 branch December 15, 2019 23:59
@aerostitch
Copy link
Contributor Author

Thanks for the quick merge! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants