Liquid tests in ruby 1.9.2

M

Miguel Teixeira

Good evening,

My company has forked the liquid template engine.
We are trying to know if the template engine works fine with ruby 1.9.2
and rails 3. Unfortunately we are unable to run the tests because of the
following error:

mikemacbook:liquid miguelfteixeira$ rake test
(in /Users/miguelfteixeira/programming/work/gnomeslab/liquid)
Hoe.new {...} deprecated. Switch to Hoe.spec.
test/assign_test.rb:1:in `require': no such file to load -- test/helper
(LoadError)
from test/assign_test.rb:1:in `<top (required)>'
from
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`load'
from
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`block in <main>'
from
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`each'
from
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`<main>'
rake aborted!
Command failed with status (1):
[/Users/miguelfteixeira/.rvm/rubies/ruby-1....]

The tests are working in ruby 1.8 environment.

Thanks,

Miguel Teixeira
 
J

John Barnette

Good evening,
=20
My company has forked the liquid template engine.
We are trying to know if the template engine works fine with ruby = 1.9.2
and rails 3. Unfortunately we are unable to run the tests because of = the
following error:
=20
mikemacbook:liquid miguelfteixeira$ rake test
(in /Users/miguelfteixeira/programming/work/gnomeslab/liquid)
Hoe.new {...} deprecated. Switch to Hoe.spec.
test/assign_test.rb:1:in `require': no such file to load -- =
test/helper

"." is most likely not in the load path during tests in 1.9.2.


~ j.

(LoadError)
from test/assign_test.rb:1:in `<top (required)>'
from
= /Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/r=
ake/rake_test_loader.rb:5:in
`load'
from
=
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/r=
ake/rake_test_loader.rb:5:in
`block in <main>'
from
= /Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/r=
ake/rake_test_loader.rb:5:in
`each'
from
=
/Users/miguelfteixeira/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/r=
ake/rake_test_loader.rb:5:in
`<main>'
rake aborted!
Command failed with status (1):
[/Users/miguelfteixeira/.rvm/rubies/ruby-1....]
=20
The tests are working in ruby 1.8 environment.
=20
Thanks,
=20
Miguel Teixeira
--=20
Posted via http://www.ruby-forum.com/.
=20
 
M

Miguel Teixeira

John said:
"." is most likely not in the load path during tests in 1.9.2.


~ j.

Thanks John, i just added t.libs << "." in the RakeTask configuration in
Rakefile and it works.

Why did i need the current directory in the include path if there is no
helper folder?
 
J

John Barnette

=20
Thanks John, i just added t.libs << "." in the RakeTask configuration = in=20
Rakefile and it works.
=20
Why did i need the current directory in the include path if there is = no=20
helper folder?

When Rake runs, the cwd is the root of your project. If you add "." to =
the load path for the test task, the "./test/helper.rb" file will be =
loaded properly by 'require "test/helper".


~ j.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top