Creating a context in custom shoulda macro does not work.
- by Honza
I have a custom should macro in my test_helper.rb which looks like this.
def self.should_require_login(actions = [:index])
if (actions.is_a? Symbol)
actions = [actions]
end
context "without user" do
actions.each do |action|
should "redirect #{action.to_s} away" do
get action
…