Sha256: 3dc1e34554ee00de2e80c70e19e2e81d3d5a54e9dc7631de670e4cf03cf49a23

Contents?: true

Size: 616 Bytes

Versions: 12

Compression:

Stored size: 616 Bytes

Contents

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

RSpec.describe "ARGV-check" do
  it 'given "tanaka", return "Hello, tanaka.\n"' do
    workshop = "#{ENV['HOME']}/.ruby_learner/workshop"
    stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 'tanaka'")
    expect { puts stdout }.to output("Hello, tanaka.\n").to_stdout
  end
  it 'given "yamada", return "Hello, yamada.\n"' do
    workshop = "#{ENV['HOME']}/.ruby_learner/workshop"
    stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 'yamada'")
    expect { puts stdout }.to output("Hello, yamada.\n").to_stdout
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ruby_learner-1.2.2 contents/questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.2.1 contents/questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.2.0 contents/questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.15 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.14 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.13 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.11 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_11/part_1/spec/workplace_spec.rb