Module: Betamax::RSpec
- Included in:
- Betamax
- Defined in:
- lib/betamax/rspec.rb
Constant Summary collapse
- DEFAULT_TAPES_FOLDER =
Pathname.new "spec/betamax_tapes/"
Instance Method Summary collapse
Instance Method Details
#install_rspec! ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/betamax/rspec.rb', line 9 def install_rspec! ::RSpec.configure do |config| config.around :each, :betamax do |example| Betamax.play_rspec example end end end |
#play_rspec(example, tapes_folder: DEFAULT_TAPES_FOLDER) ⇒ Object
5 6 7 |
# File 'lib/betamax/rspec.rb', line 5 def play_rspec example, tapes_folder: DEFAULT_TAPES_FOLDER Player.new(example, tapes_folder:).play end |