"Shoulda" gem and code completion
Hello,
I'm using the "shoulda" gem (http://thoughtbot.com/projects/shoulda/) for writing my tests. For some unknown reason I just can't get the code completion working (Ctrl+Space or Ctrl+Alt+Space). The same is true for "assert_"
I narrowed it down that it has smth. to do with the way tests are written. When writing "normal" tests like:
def test_foo
assert...
end
then the code completion is working inside the test_foo method. But when changing to the "shoulda" way:
context "foo" do
...
should_respond_with :success
...
should "simply work" do
assert ...
end
end
then the code completion is not working for either "assert_*" or "should_*".
Is there any way to get the code completion working for such cases?
Thx and best regards,
Andreas
请先登录再写评论。
Hi Andreas,
RubyMine doesn't have special Shoulda support. So RubyMine doesn't understand shoulda's DSL for writing tests and thinks that context and should blocks have static class level context(assert_* methods are in the non-static instance level context). I've created issue for this http://www.jetbrains.net/jira/browse/RUBY-3380. Feel free to watch it's status, vote for the issue and comment it.
Thank you for suggestion!