Sha256: 2c8eb9ed74f481cb44ff85eb430a987f82bac35b98fec5bc9cb69cf66240f259
Contents?: true
Size: 650 Bytes
Versions: 7
Compression:
Stored size: 650 Bytes
Contents
# -*- coding: utf-8 -*- require "open3" RSpec.describe "ARGV-check" do it 'given 2 4 5, return "表面積=76\n体積=40\n"' do workshop = "#{ENV['HOME']}/.ruby_learner/workshop" stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 2 4 5") expect { puts stdout }.to output("表面積=76\n体積=40\n").to_stdout end it 'given 20 4 13, return "表面積=784\n体積=1040\n"' do workshop = "#{ENV['HOME']}/.ruby_learner/workshop" stdout, stderr, status = Open3.capture3("ruby #{workshop}/lib/workplace.rb 20 4 13") expect { puts stdout }.to output("表面積=784\n体積=1040\n").to_stdout end end
Version data entries
7 entries across 7 versions & 1 rubygems