LoginSignup
0
0

More than 5 years have passed since last update.

Aruba gem - REPL

Posted at

Aruba の REPLについてまとめます。
Aruba は aruba console によって対話環境を利用することができます。

サンプル

$ bundle exec aruba console

# aruba_help でヘルプを表示
aruba:001:0> aruba_help
Aruba Version: 0.14.2
Issue Tracker: https://github.com/cucumber/aruba/issues
Documentation:
* http://www.rubydoc.info/gems/aruba

# aruba_methods でメソッドを表示
aruba:002:0> aruba_methods
Available Methods:
* _create_file
* _create_fixed_size_file
* _ensure_newline
* _mkdir
* _read_interactive
* _rm
* _write_interactive
* a_block_changing
* a_block_outputting
* a_block_raising
* a_block_throwing
* a_block_yielding_control
* a_block_yielding_successive_args
* a_block_yielding_with_args
* a_block_yielding_with_no_args
* a_collection_containing_exactly
* a_collection_ending_with
* a_collection_including
* a_collection_starting_with
* a_command_found_in_path
* a_command_having_output
* a_directory_having_sub_directory
* a_falsey_value
* a_falsy_value
* a_file_having_content
* a_file_name_matching
* a_file_of_size
* a_file_with_same_content_like
* a_hash_including
* a_kind_of
* a_nil_value
* a_path_having_permissions
* a_path_matching_pattern
* a_range_covering
* a_string_ending_with
* a_string_including
* a_string_matching
* a_string_starting_with
* a_truthy_value
* a_value
* a_value_between
* a_value_within
* absolute?
* absolute_path
* aggregate_failures
* all
* all_commands
* all_directories
* all_files
* all_output
* all_paths
* all_stderr
* all_stdout
* an_absolute_path
* an_existing_directory
* an_existing_executable
* an_existing_file
* an_existing_path
* an_instance_of
* an_object_eq_to
* an_object_eql_to
* an_object_equal_to
* an_object_existing
* an_object_having_attributes
* an_object_matching
* an_object_responding_to
* an_object_satisfying
* an_output_string_being_eq
* an_output_string_including
* an_output_string_matching
* announce_or_puts
* announcer
* append_environment_variable
* append_output_to
* append_to_file
* aruba
* assert_exact_output
* assert_exit_status
* assert_exit_status_and_output
* assert_exit_status_and_partial_output
* assert_failing_with
* assert_matching_output
* assert_no_partial_output
* assert_not_exit_status
* assert_not_matching_output
* assert_partial_output
* assert_partial_output_interactive
* assert_passing_with
* assert_success
* be
* be_a
* be_a_command_found_in_path
* be_a_kind_of
* be_an
* be_an_absolute_path
* be_an_existing_directory
* be_an_existing_executable
* be_an_existing_file
* be_an_existing_path
* be_an_instance_of
* be_between
* be_falsey
* be_falsy
* be_instance_of
* be_kind_of
* be_nil
* be_successfully_executed
* be_truthy
* be_within
* cd
* change
* changing
* check_binary_file_content
* check_directory_presence
* check_exact_file_content
* check_file_content
* check_file_presence
* check_file_size
* check_filesystem_permissions
* check_for_deprecated_variables
* chmod
* clean_current_dir
* clean_current_directory
* close_input
* contain_exactly
* containing_exactly
* copy
* cover
* covering
* create_dir
* create_directory
* current_dir
* current_directory
* current_ruby
* delete_environment_variable
* detect_ruby
* directory
* directory?
* dirs
* disk_usage
* end_with
* ending_with
* eot
* eq
* eq_to
* eql
* eql_to
* equal
* equal_to
* executable?
* exist
* exist?
* existing
* exit_timeout
* expand_path
* expect
* extract_text
* file?
* file_content_including
* file_content_matching
* file_size
* filesystem_permissions
* find_command
* fixtures_directory
* get_process
* have_attributes
* have_exit_status
* have_failed_running
* have_file_content
* have_file_size
* have_finished_in_time
* have_output
* have_output_on_stderr
* have_output_on_stdout
* have_output_size
* have_permissions
* have_same_file_content_like
* have_sub_directory
* having_attributes
* in_current_dir
* in_current_directory
* include_an_object
* include_output_string
* include_regexp
* including
* io_wait
* last_command
* last_command_started
* last_command_stopped
* last_exit_status
* list
* match
* match_array
* match_output_string
* match_path_pattern
* match_regex
* matching
* mod?
* move
* only_processes
* original_env
* output
* output_from
* output_string_eq
* overwrite_file
* pipe_in_file
* prep_for_fs_check
* prepend_environment_variable
* process_monitor
* processes
* raise_error
* raise_exception
* raising
* read
* register_process
* relative?
* remove
* remove_dir
* remove_directory
* remove_file
* replace_variables
* respond_to
* responding_to
* restore_env
* root_directory
* run
* run_interactive
* run_simple
* run_too_long
* sanitize_text
* satisfy
* satisfying
* set_env
* set_environment_variable
* setup_aruba
* start_with
* starting_with
* stderr_from
* stdout_from
* stop_all_commands
* stop_process
* stop_processes!
* terminate_all_commands
* terminate_process
* terminate_processes!
* throw_symbol
* throwing
* touch
* touch_file
* type
* unescape
* unescape_text
* unset_bundler_env_vars
* use_clean_gemset
* which
* with_env
* with_environment
* with_file_content
* within
* write_file
* write_fixed_size_file
* yield_control
* yield_successive_args
* yield_with_args
* yield_with_no_args
* yielding_control
* yielding_successive_args
* yielding_with_args
* yielding_with_no_args
# => nil

# aruba の helper method をつかってみる
aruba:003:0> write_file("hoge.txt", "hogehogeho")
# => nil
aruba:004:0> read("hoge.txt")
# => ["hogehogeho"]

外部資料

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0