зеркало из https://github.com/github/ruby.git
Update to ruby/mspec@36e8ed8
This commit is contained in:
Родитель
1ca3482e0a
Коммит
40c9a3dad5
|
@ -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
|
||||
|
|
|
@ -13,6 +13,7 @@ RSpec.describe "Running mspec tag" do
|
|||
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
|
||||
|
@ -26,15 +27,15 @@ Tag#me érròrs in unicode
|
|||
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
|
||||
|
||||
|
|
|
@ -66,3 +66,5 @@ PublicMSpecMatchers = Class.new {
|
|||
include MSpecMatchers
|
||||
public :raise_error
|
||||
}.new
|
||||
|
||||
BACKTRACE_QUOTE = RUBY_VERSION >= "3.4" ? "'" : "`"
|
||||
|
|
Загрузка…
Ссылка в новой задаче