Sha256: 4e72b0afb0d122e1330ecc9d30e1be6493aa0ad40906b58543d6b8eafec3d116

Contents?: true

Size: 628 Bytes

Versions: 10

Compression:

Stored size: 628 Bytes

Contents

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

RSpec.describe "match-check" do
  it "given 'Hello, Ruby.', return \"match.\\n\"" do
    workshop = "#{ENV['HOME']}/.ruby_learner/workshop"
    stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 'Hello, Ruby.'")
    expect { puts stdout }.to output("match.\n").to_stdout
  end
  it 'given "hogehoge", return "表面積=784\n体積=1040\n"' do
    workshop = "#{ENV['HOME']}/.ruby_learner/workshop"
    stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 'hogehoge'")
    expect { puts stdout }.to output("not match.\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_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.15 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.14 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.13 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.11 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_8/part_1/spec/workplace_spec.rb