Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTJ Takei
13,362 PointsSuppression of deprecated warning: "RSpec::Core::ExampleGroup#example..." in the rspec test.
In the "Write Our First Tests" video, my environment of Treehouse VM on Windows 8 yields the warning message as shown in the title that is annoying. I added a line: "config.expose_current_running_example_as :example" in the first block of ...\spec\spec_helper.rb file, as instructed in the warning. Is this ok?
2 Answers
Aaron Kaye
10,948 PointsI think it needs to go inside the "RSpec.configure do |config|" so i put mine near the end but before the word end
Adam Shields
4,573 PointsJust to further clarify things for newbies like me. The actual path to the file would be ODOT/spec/spec_helper.rb and the config change that I added to get rid of the long warning messages was right after the
RSpec.configure do |config|
I added
config.expose_current_running_example_as :example
so the completed syntax looks like
RSpec.configure do |config| config.expose_current_running_example_as :example
this is all on line #20 of the ODOT/spec/spec_helper.rb