Skip to content

Instantly share code, notes, and snippets.

@jamesbebbington
Created August 12, 2011 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesbebbington/1142130 to your computer and use it in GitHub Desktop.
Save jamesbebbington/1142130 to your computer and use it in GitHub Desktop.
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