Skip to content

Instantly share code, notes, and snippets.

@JunichiIto
Created November 8, 2015 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JunichiIto/048309f9e8bb258e7d7b to your computer and use it in GitHub Desktop.
Save JunichiIto/048309f9e8bb258e7d7b to your computer and use it in GitHub Desktop.
require 'rspec'
class Person
def hello(name)
puts "Hello, #{name}"
end
end
describe do
example do
person = Person.new
expect(person).to receive(:hello).with('Alice').ordered
expect(person).to receive(:hello).with('Bob').ordered
person.hello 'Alice'
person.hello 'Bob'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment