minitest/spec pull request

B

Brian Takita

Hello, I submitted a change request that makes the failure output in
mini spec show the exact string of the describe block, rather than the
camel-cased version of the string.
http://github.com/seattlerb/minitest/pull/4

I was wondering what people thought.

e.g.

describe "A fool" do
describe "Running a fools errand" do
it "is impotent" do
true.must_eql false
end
end
end

1) Failure:
test_0001_is_impotent(AFoolSpec::RunningAFoolsErrandSpec)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

This patch creates the following output:

1) Failure:
test_0001_is_impotent(A fool::Running a fools errand)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

Converting the it block to test_0001_is_impotent is a bit weird too.
Maybe the method could just have 'test' prepended to the exact string?

1) Failure:
test_0001 - is impotent (A fool::Running a fools errand)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

Thank you,
Brian
 
B

Brian Takita

Hello, I submitted a change request that makes the failure output in
mini spec show the exact string of the describe block, rather than the
camel-cased version of the string.
http://github.com/seattlerb/minitest/pull/4
Oops, I messed up the pull request. Here is the correct one.
http://github.com/seattlerb/minitest/pull/5
I was wondering what people thought.

e.g.

describe "A fool" do
=A0describe "Running a fools errand" do
=A0 =A0it "is impotent" do
=A0 =A0 =A0true.must_eql false
=A0 =A0end
=A0end
end

=A01) Failure:
test_0001_is_impotent(AFoolSpec::RunningAFoolsErrandSpec)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

This patch creates the following output:

=A01) Failure:
test_0001_is_impotent(A fool::Running a fools errand)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

Converting the it block to test_0001_is_impotent is a bit weird too.
Maybe the method could just have 'test' prepended to the exact string?

=A01) Failure:
test_0001 - is impotent (A fool::Running a fools errand)
[/home/honk/workspace/honk/junk.rb:9]:
Expected false, not true.

Thank you,
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top