Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9222609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:52:23+00:00 2026-06-18T03:52:23+00:00

From the docs : Per default Aruba will create a directory tmp/aruba where it

  • 0

From the docs:

Per default Aruba will create a directory tmp/aruba where it performs its file operations.

However, my application uses ENV["HOME"] to create and read a file (~/.foorc), so I need Aruba to use a fake ENV["HOME"].

Do I need to set it in some support-file, or is there a way to tell Aruba to its tmp/aruba for files in ENV["HOME"]?

Here is an excerpt of my code that I am testing (obviously I am testing this with Cucumber/Aruba on a much higher level, but the usage of ENV[“HOME”] is what is important here.):

def initialize config_path = ""
  if config_path.empty?
    @config_path = File.join ENV["HOME"], ".todotxt.cfg"
  else
    @config_path = config_path
  end

  if file_exists?
    super @config_path
    validate
  end
end

def file_exists?
  File.exists? @config_path
end

#....
  ask_to_create unless @config.file_exists?
#...

The Specification:

Scenario: todotxt
  Given an empty installation
  When I run `todotxt`
  Then it should pass with:
    """
    Should I create a sample config file? [Y/n]
    """
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:52:24+00:00Added an answer on June 18, 2026 at 3:52 am

    Looking into the implementation in Aruba itself, I could craft something very similar:

    File features/support/aruba.rb, is autoloaded by cucumber and implements the Around hook:

    # Temporarily enforce an isolated, fake, homedir.
    around do |scenario, block|
      @__aruba_original_home = ENV["HOME"]
      ENV["HOME"] = File.expand_path(File.join("tmp", "aruba"))
      block.call
      ENV["HOME"] = @__aruba_original_home
    end
    

    From now on, a directory tmp/aruba is used as $HOME.

    Note that in aruba, this temporary path is configurable, and that above code does not take that into consideration. It will break when the tmp path is configured elsewhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From: RewriteBase Apache Docs # /abc/def/.htaccess -- per-dir config file for directory /abc/def #
Switching from JVM 1.4 to 1.5 has performance benefits as per release notes. http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#performance
I set up a set of partitioned tables per the docs at http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html CREATE
As per the docs,it expects this file in a folder named 'registration' in templates
I want a log source per class like the basic_logger example from the docs
I understand from the MSDN docs that the event DataReceived will not necessarily fire
4.2 Jellybean now supports multiple users. However as per the docs , all calls
From the docs: A table view in the UIKit framework is limited to a
from the docs: the reordering control temporarily replaces any accessory view. So when I
From the docs: A plain-style table view is an unbroken list; a grouped table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.