Sha256: 6d1218a18d128c3cb05fd0b16aa38d7f4d258e8d3d1db97f8b9d42a3be43f16b

Contents?: true

Size: 504 Bytes

Versions: 8

Compression:

Stored size: 504 Bytes

Contents

require "open3"

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_learner-1.1.14 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.13 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.11 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_6/part_1/spec/workplace_spec.rb