require 'polytrix' RSpec.configure do |c| c.expose_current_running_example_as :example end Polytrix.validate suite: 'Katas', sample: 'hello world' do |challenge| expect(challenge.result.stdout).to eq "Hello, world!\n" end Polytrix.validate suite: 'Katas', sample: 'quine' do |challenge| expect(challenge.result.stdout).to eq(challenge.source) end Polytrix.validate do |challenge| expect(challenge.result.exitstatus).to eq(0) expect(challenge.result.stderr).to be_empty expect(challenge.result.stdout).to end_with "\n" end