Skip to content

Commit

Permalink
Update to ruby/mspec@36e8ed8
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Feb 26, 2024
1 parent 1ca3482 commit 40c9a3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions spec/mspec/spec/integration/run_spec.rb
@@ -1,20 +1,21 @@
require 'spec_helper'

RSpec.describe "Running mspec" do
q = BACKTRACE_QUOTE
a_spec_output = <<EOS
1)
Foo#bar errors FAILED
Expected 1 == 2
to be truthy but was false
CWD/spec/fixtures/a_spec.rb:8:in `block (2 levels) in <top (required)>'
CWD/spec/fixtures/a_spec.rb:2:in `<top (required)>'
CWD/spec/fixtures/a_spec.rb:8:in #{q}block (2 levels) in <top (required)>'
CWD/spec/fixtures/a_spec.rb:2:in #{q}<top (required)>'
2)
Foo#bar fails ERROR
RuntimeError: failure
CWD/spec/fixtures/a_spec.rb:12:in `block (2 levels) in <top (required)>'
CWD/spec/fixtures/a_spec.rb:2:in `<top (required)>'
CWD/spec/fixtures/a_spec.rb:12:in #{q}block (2 levels) in <top (required)>'
CWD/spec/fixtures/a_spec.rb:2:in #{q}<top (required)>'
Finished in D.DDDDDD seconds
EOS
Expand Down
9 changes: 5 additions & 4 deletions spec/mspec/spec/integration/tag_spec.rb
Expand Up @@ -13,6 +13,7 @@
it "tags the failing specs" do
fixtures = "spec/fixtures"
out, ret = run_mspec("tag", "--add fails --fail #{fixtures}/tagging_spec.rb")
q = BACKTRACE_QUOTE
expect(out).to eq <<EOS
RUBY_DESCRIPTION
.FF
Expand All @@ -26,15 +27,15 @@
Tag#me errors FAILED
Expected 1 == 2
to be truthy but was false
CWD/spec/fixtures/tagging_spec.rb:9:in `block (2 levels) in <top (required)>'
CWD/spec/fixtures/tagging_spec.rb:3:in `<top (required)>'
CWD/spec/fixtures/tagging_spec.rb:9:in #{q}block (2 levels) in <top (required)>'
CWD/spec/fixtures/tagging_spec.rb:3:in #{q}<top (required)>'
2)
Tag#me érròrs in unicode FAILED
Expected 1 == 2
to be truthy but was false
CWD/spec/fixtures/tagging_spec.rb:13:in `block (2 levels) in <top (required)>'
CWD/spec/fixtures/tagging_spec.rb:3:in `<top (required)>'
CWD/spec/fixtures/tagging_spec.rb:13:in #{q}block (2 levels) in <top (required)>'
CWD/spec/fixtures/tagging_spec.rb:3:in #{q}<top (required)>'
Finished in D.DDDDDD seconds
Expand Down
2 changes: 2 additions & 0 deletions spec/mspec/spec/spec_helper.rb
Expand Up @@ -66,3 +66,5 @@ def ensure_mspec_method(method)
include MSpecMatchers
public :raise_error
}.new

BACKTRACE_QUOTE = RUBY_VERSION >= "3.4" ? "'" : "`"

0 comments on commit 40c9a3d

Please sign in to comment.