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