Sha256: 92948496a3a0fd09418ef238fded882e38a118661bc4e3c8e7ada3b15327c95e

Contents?: true

Size: 763 Bytes

Versions: 31

Compression:

Stored size: 763 Bytes

Contents

# -*- coding: utf-8 -*-
require "open3"

RSpec.describe "ARGV-check" do
  it 'given "for-read.txt", return 4' do
    workshop = "#{ENV['HOME']}/.ruby_learner/workshop"
    stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb #{workshop}/lib/for-read.txt")
    expect { puts stdout }.to output("このファイルはファイル読み込み用の練習ファイルです。\n\nむかしむかし、あるところに、おじいさんとおばあさんが住んでいました。\nおじいさんは山へしばかりに、おばあさんは川へせんたくに行きました。\nおばあさんが川でせんたくをしていると、ドンブラコ、ドンブラコと、大きな桃が流れてきました。\n").to_stdout
  end
end

Version data entries

31 entries across 19 versions & 1 rubygems

Version Path
ruby_learner-1.1.11 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_9/part_2/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_9/part_2/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_9/part_2/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_9/part_2/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_9/part_2/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_9/part_1/spec/workplace_spec.rb