Created
August 12, 2011 14:21
-
-
Save jamesbebbington/1142130 to your computer and use it in GitHub Desktop.
ArgumentError with CellTests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationCell < Cell::Rails | |
helper ApplicationHelper | |
helper I18nHelper | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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