Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Interactor1
def call
context.fail! error: 'Failure. This is lost.'
end
end
class Interactor2
def call
foreign_context = Interactor1.call!(b: 2)
puts "THIS WILL NEVER BE CALLED."
end
end
describe 'Dangerous interactor behaviour' do
subject { Interactor2.call(a: 1) }
it 'succeds when it should fail' do
expect(subject.success?).to eq true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.