Can rspec subject() have it's methods auto-complete?
Hi,
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.
Example:
class file
class Foo
def bar
puts 'bar'
end
end
spec file
describe Foo do
it "should print bar" do
subject.bar.should == "bar"
end
end
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.
请先登录再写评论。
Anyone from JetBrains able to comment on this?
It isn't supported at the moment, please file a feature request.
Thanks
http://youtrack.jetbrains.net/issue/RUBY-9847