RSpec 3.0.1 and RubyMine
After the recent RSpec update, warnings started showing up in RubyMine:
Deprecation Warnings: Treating
metadata[:execution_result]
as a hash is deprecated. Use the attributes methods to access the data instead. Called from …/teamcity/rspec3_formatter.rb: line#
(So, RSpec is complaining that RubyMine’s formatter is not accessing its data properly?) The warnings were overwhelming to the point of obscuring the results of running the test. Simple fix:
-
open /Applications/RubyMine.app/rb/testing/patch/bdd/teamcity/spec/runner/formatter/teamcity/rspec3_formatter.rb by clicking on one of the links in the warning message
-
this takes you right to the offending lines (#135, 333 & 340 in my version), wherein, as per the message’s instructions, the hash format
needs to be changed to an attribute accessor
No more warnings :)
(In the process, I also learned that while File > Open Recent works to reopen projects, View > Recent Files (or ⌘-E
) is for recently closed files.)