RSpec 3.0.1 & 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/ 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
started_at_ms = get_time_in_ms(example.execution_result[:started_at])

needs to be changed to an attribute accessor

started_at_ms = get_time_in_ms(example.execution_result.started_at)

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.)

Tagged , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: