Created
October 17, 2011 16:23
-
-
Save rsutphin/1293001 to your computer and use it in GitHub Desktop.
RSpec 2.7.0: Problem with full_description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'A' do | |
describe '#foo' do | |
it 'is generally okay' do; end | |
describe 'subconcern' do | |
it 'has common behavior' do; end | |
describe 'case 1' do | |
it 'does the right thing' do; end | |
end | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec/core/formatters/base_formatter' | |
class DebugFormatter < ::RSpec::Core::Formatters::BaseFormatter | |
def start(*args) | |
super | |
STDOUT.puts "rspec-core #{RSpec::Core::Version::STRING}" | |
end | |
def example_started(example) | |
super | |
STDOUT.puts "Example: #{example.full_description.inspect}" | |
end | |
def example_group_started(example_group) | |
super | |
STDOUT.puts " Group: #{example_group.metadata[:example_group][:full_description].inspect}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rspec _2.6.4_ -I. -f DebugFormatter a_spec.rb | |
rspec-core 2.6.4 | |
Group: "A" | |
Group: "A#foo" | |
Example: "A#foo is generally okay" | |
Group: "A#foo subconcern" | |
Example: "A#foo subconcern has common behavior" | |
Group: "A#foo subconcern case 1" | |
Example: "A#foo subconcern case 1 does the right thing" | |
$ rspec _2.7.0_ -I. -f DebugFormatter a_spec.rb | |
rspec-core 2.7.0 | |
Group: "A" | |
Group: "A#foo" | |
Example: "A#foo is generally okay" | |
Group: "A A#foo subconcern" | |
Example: "A A#foo subconcern has common behavior" | |
Group: "A A#foo A A#foo subconcern case 1" | |
Example: "A A#foo A A#foo subconcern case 1 does the right thing" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment