Skip to content

Commit

Permalink
App should store env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Nucc committed Apr 19, 2013
1 parent 9a8a886 commit 97d147c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lucie-lib/lib/lucie/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def exit_value
@exit_value
end

def env
ENV
end

private

def call_method_invoking_process
Expand Down Expand Up @@ -98,7 +102,6 @@ def include_controller_for(task)
raise ControllerNotFound, task
end


def call_action_on_controller
method = action
if controller_has_action? action
Expand Down
4 changes: 4 additions & 0 deletions lucie-lib/test/functional/app_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,8 @@
should "know the directory where it was called" do
assert_equal TestApp.new("", nil).pwd, File.expand_path("../../../", __FILE__)
end

should "store the ENV" do
assert_equal ENV["PWD"], TestApp.init([], "").env["PWD"]
end
end

0 comments on commit 97d147c

Please sign in to comment.