Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
how does the the test works? #1683
I initialized a new project with padrino 0.12.2 and chose minitest as my test framework. But i am very confused with the test behavior.
it fail with
And then i create another project with test frame work spec to test the situation. i do the same procedure, It fail but give me different message.
With Rspec, It can find the constant Techcomm::App::UserHelper.
And then i run the spec separately.
It cant find the constant Booking::App::BaseHelper, the same with minitest.
It found the constant Booking::App::BaseHelper !!!
Why?? I cant understand what happened.
@padrino/core-members I guess these patches fix this problem, but I want to find better solution.
# test/app/helpers/user_helper_test.rb before do get "/" unless defined?(Techcomm::App::UserHelper) # <- Add this @helpers = Class.new @helpers.extend Techcomm::App::UserHelper end
# test/test_config.rb RACK_ENV = 'test' unless defined?(RACK_ENV) require File.expand_path('../../config/boot', __FILE__) Padrino.application # <- Add this class MiniTest::Spec include Rack::Test::Methods