Sha256: 85d15fec01f6c8db44db41bd8fae25bb68648a23ccef0568f94995d040d4740c
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
# spec/enhanced_errors_spec.rb # INSTRUCTIONS: Install rspec # gem install rspec # rspec examples/example_spec.rb require 'rspec' require_relative '../lib/enhanced_errors' RSpec.configure do |config| # -- Add to your RSPec config in your spec_helper. config.before(:example) do |_example| EnhancedErrors.start_rspec_binding_capture end config.before(:example) do |_example| EnhancedErrors.start_rspec_binding_capture end config.after(:example) do |example| EnhancedErrors.override_rspec_message(example, EnhancedErrors.stop_rspec_binding_capture) end # -- End EnhancedErrors config end RSpec.describe 'Neo' do describe 'sees through' do let(:the_matrix) { 'code rains, dramatically' } before(:each) do @spoon = 'there is no spoon' end it 'the matrix' do #activate memoized item the_matrix stop = 'bullets' raise 'No!' end it "dodges multiple exception-bullets at once" do foo = 'bar' expect(1).to eq(2) expect(true).to eq(false) end after(:each) do raise "This is another error" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enhanced_errors-2.1.3 | examples/demo_rspec.rb |
enhanced_errors-2.1.2 | examples/demo_rspec.rb |
enhanced_errors-2.1.1 | examples/demo_rspec.rb |