You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the assertions in the Rails bundle are problematic, in my opinion.
First, assert_response(), the assert_redirected_to() family of methods, and assert_rjs() don't match the snippet trigger conventions. I think they should have triggers of asr, asrt, and asr respectively. I also think the assert_redirected_to() triggers should loose all of their special trigger suffixes. It can be sorted out by a pop-up menu from TextMate.
The other issue I'm aware of is that the Rails bundle is masking some Ruby bundle triggers. ass for assert_select() hides assert_same() and assert_send() from the Ruby bundle. Also, if you follow my advice above and switch the triggers above, you will begin hiding assert_raise() under asr.
This is one of those rare cases where TextMate scopes hurt us. Rails is a more specific scope an wins matches, hiding the Ruby functionality. Since we encourage Rails developers to just switch Ruby files to the Rails scope, they tend to lose this functionality globally. I think it's more correct to keep the Rails bundle being the Ruby bundle plus to support this usage pattern.
I'm not sure what the right way to fix it is. I guess the best we can do is rescope the problematic triggers as normal Ruby, instead of Rails. This means they will be added in even outside of the Rails scopes, but at least they would stop hiding options from the Ruby bundle. I'm open to other ideas though.
The text was updated successfully, but these errors were encountered:
The best I can think of still is to scope them as normal Ruby. At least that would stop them from hiding features. You might try asking in ##textmate though, just to make sure there aren't other ideas.
Some of the assertions in the Rails bundle are problematic, in my opinion.
First, assert_response(), the assert_redirected_to() family of methods, and assert_rjs() don't match the snippet trigger conventions. I think they should have triggers of asr, asrt, and asr respectively. I also think the assert_redirected_to() triggers should loose all of their special trigger suffixes. It can be sorted out by a pop-up menu from TextMate.
The other issue I'm aware of is that the Rails bundle is masking some Ruby bundle triggers. ass for assert_select() hides assert_same() and assert_send() from the Ruby bundle. Also, if you follow my advice above and switch the triggers above, you will begin hiding assert_raise() under asr.
This is one of those rare cases where TextMate scopes hurt us. Rails is a more specific scope an wins matches, hiding the Ruby functionality. Since we encourage Rails developers to just switch Ruby files to the Rails scope, they tend to lose this functionality globally. I think it's more correct to keep the Rails bundle being the Ruby bundle plus to support this usage pattern.
I'm not sure what the right way to fix it is. I guess the best we can do is rescope the problematic triggers as normal Ruby, instead of Rails. This means they will be added in even outside of the Rails scopes, but at least they would stop hiding options from the Ruby bundle. I'm open to other ideas though.
The text was updated successfully, but these errors were encountered: