Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ArgumentError with CellTests
class ApplicationCell < Cell::Rails
helper ApplicationHelper
helper I18nHelper
end
class PageCell < ApplicationCell
cache :footer, :footer_cache_key
def footer(args)
@locale = args[:locale]
render
end
def footer_cache_key(args)
{
:locale => args[:locale],
:version => FooApp.version.to_s
}
end
end
require 'test_helper'
class PageCellTest < Cell::TestCase
tests PageCell
should "render footer" do
invoke(:footer, :locale => I18n.locale)
assert_select "#footer"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment