Closed tobyapi closed 7 years ago
The initialize method in Amethyst::Base::App receive two default arguments:
def initialize(app_path= __FILE__, app_type={{@type.name.stringify}})
Here, app_path initialize by "?" because FILE is "?" in default argument of initialize method. For Example:
class A def initialize(@file : String =__FILE__) puts @file end def get(@file=__FILE__) puts @file end end a = A.new # => "?" a.get # => file_path
So, "initialize should set app name" in spec/base/application_spec.cr is failing.
spec/base/application_spec.cr:
app = Base::App.new it "should set app name" do app.name.should eq "application_spec" # app.name => "?" end
One way to solve it is to remove a default argument of app_path.
In this request, I suggest better code.
The initialize method in Amethyst::Base::App receive two default arguments:
Here, app_path initialize by "?" because FILE is "?" in default argument of initialize method. For Example:
So, "initialize should set app name" in spec/base/application_spec.cr is failing.
spec/base/application_spec.cr:
One way to solve it is to remove a default argument of app_path.