Skip to content

Instantly share code, notes, and snippets.

@fukajun
Created May 10, 2012 12:57
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 fukajun/2652860 to your computer and use it in GitHub Desktop.
Save fukajun/2652860 to your computer and use it in GitHub Desktop.
2つのコントローラーで共通するアクションのテスト
# ???controller_spec.rb
[AController, BController].each do |cotroller|
describe controller do
it do
#共通するテスト
end
end
end
# a_controller_spec.rb
describe AController do
it do
#Aのみのテスト
end
end
# b_controller_spec.rb
describe BController do
it do
##Bのみのテスト
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment