Skip to content

Error when regex used in raise_error #72

Closed
@krisleech

Description

@krisleech
# $ ruby -W0 query.rb

require "bundler/inline"

gemfile(false) do
  source "https://rubygems.org"
  gem "rspec"
  gem "super_diff", '0.4.1'
  gem "pry-byebug"
end

require "super_diff/rspec"

require 'rspec/autorun'

RSpec.describe 'test' do
  it 'causes an error' do
    expect { raise('foo') }.to raise_error(/sdfsdf/)
  end
end
NoMethodError:
       undefined method `name' for /sdfsdf/:Regexp
       Did you mean?  names
     # super_diff-0.4.1/lib/super_diff/rspec/monkey_patches.rb:666:in `expected_for_matcher_text'
  • super_diff 0.4.1
  • ruby 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions