Can rspec subject() have it's methods auto-complete?


Anyone know if it's possible to have RubyMine autocomplete the methods for the subject in a spec? In the example below, I was hoping that Rubymine would be able to autocomplete the 'bar' method on subject.  Rubymine does autocomplete subject as I type subject, but not the methods.


class file

class Foo
   def bar
     puts 'bar'

spec file

describe Foo do
     it "should print bar" do == "bar"

I know I could work around it by explcitly creating an instance in the 'it' block, but I was hoping to keep my specs DRY'er.  

Please sign in to leave a comment.