Sha256: 3846ba63e519d3733b774f0869edb6914e320e37b2fef1d12cbe2af1f859be1d

Contents?: true

Size: 538 Bytes

Versions: 18

Compression:

Stored size: 538 Bytes

Contents

require "open3"

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_learner-1.2.8 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.7 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.6 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.5 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.4 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.3 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.2 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.1 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.2.0 contents/questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.1.15 questions/sequential_check/section_4/part_2/spec/workplace_spec.rb
ruby_learner-1.1.14 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.13 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.11 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.10 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.9 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.8 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.7 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb
ruby_learner-1.1.6 questions/sequential_check/section_4/part_1/spec/workplace_spec.rb