Skip to content

Instantly share code, notes, and snippets.

@mozamimy
Last active August 29, 2015 14:14
Show Gist options
  • Save mozamimy/59d5e3fdd5a283016dc2 to your computer and use it in GitHub Desktop.
Save mozamimy/59d5e3fdd5a283016dc2 to your computer and use it in GitHub Desktop.
2014-11-24_02.rb
require "ariete"
require_relative "klass"
RSpec.describe Klass do
describe ".output_out" do
subject { Klass.method(:output_out).to_proc }
it { expect(subject).to be_output "Ariete is a kind of rabbit.\n" }
end
describe ".output_out(with lambda)" do
subject { -> { Klass.output_out } }
it { expect(subject).to be_output "Ariete is a kind of rabbit.\n" }
end
describe ".output_err" do
subject { Klass.method(:output_err).to_proc }
it { expect(subject).to be_output_to_stderr "Ariete means 'Lop' in Italian.\n" }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment