I have a script which has evolved into needing to do some assertions and matching.
It is written in ruby, and I have included rspec
in the Gemfile and required it.
I found this very helpful SO post on how to use in irb
:
How to use RSpec expectations in irb
I also found the following:
Use RSpec's "expect" etc. outside a describe ... it block
class BF
include ::Rspec::Matchers
def self.test
expect(1).to eq(1)
end
end
BF.test
I get an error at the expect
line.