2
私のCapybarasテストは、指定されたロケールではなくデフォルトロケールでのみ動作します。Cany pass:ロケールからCapybaraのメソッド訪問
describe "How it works" do
it "should have the content 'how it works'" do
visit how_it_works_url(:locale => :en)
page.should have_content('How it works')
end
it "should have the content 'wie es geht'" do
visit how_it_works_url(:locale => :de)
page.should have_content('Wie es geht')
end
end
default_localeが 'en'の場合、最初のテストが成功し、 'de'の場合は2番目のテストが合格になります。
ルートは翻訳されません(私はgem 'rails-translate-routes'も使用しません)。