Sha256: 367ec756c63ece789686f7bdf2b5a6f12c1045d7e36a70918b5ead22d3eac661

Contents?: true

Size: 699 Bytes

Versions: 10

Compression:

Stored size: 699 Bytes

Contents

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby_learner-1.2.0 contents/questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.15 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.14 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.13 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.11 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_10/part_2/spec/workplace_spec.rb