0
@@ -197,154 +197,6 @@ class FiltersTest < ActionController::TestCase
0
conditions.each do |condition|
0
basic_filters.each do |filter|
0
- define_method "test_#{filter}_with_if_condition_#{condition.class}_which_returns_true_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'new bio', CompaniesController.bio
0
- define_method "test_#{filter}_with_if_condition_#{condition.class}_which_returns_false_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_unless_condition_#{condition.class}_which_returns_true_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_unless_condition_#{condition.class}_which_returns_false_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'new bio', CompaniesController.bio
0
- define_method "test_#{filter}_with_only_option_with_if_condition_#{condition.class}_which_returns_true_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :only => :show, :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'new bio', CompaniesController.bio
0
- define_method "test_#{filter}_with_only_option_if_condition_#{condition.class}_which_returns_false_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :only => :show, :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_only_option_unless_condition_#{condition.class}_which_returns_true_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :only => :show, :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_only_option_unless_condition_#{condition.class}_which_returns_false_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :only => :show, :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'new bio', CompaniesController.bio
0
- define_method "test_#{filter}_with_except_option_with_if_condition_#{condition.class}_which_returns_true_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :except => :show, :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'new bio', CompaniesController.bio
0
- define_method "test_#{filter}_with_except_option_if_condition_#{condition.class}_which_returns_false_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :except => :show, :if => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_except_option_unless_condition_#{condition.class}_which_returns_true_should_not_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :except => :show, :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = true
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- define_method "test_#{filter}_with_except_option_unless_condition_#{condition.class}_which_returns_false_should_change_company_bio" do
0
- CompaniesController.send filter.to_sym, 'self.bio = "new bio"', :except => :show, :unless => condition
0
- CompaniesController.bio = 'thoughtbot'
0
- @controller.flag = false
0
- assert_equal 'thoughtbot', CompaniesController.bio
0
- assert_equal 'new bio', CompaniesController.bio
0
- conditions.each do |condition|
0
- basic_filters.each do |filter|
0
define_method "test_#{filter}_with_block_callback_with_if_condition_#{condition.class}_which_returns_true_should_change_company_name" do
0
CompaniesController.send filter.to_sym, :if => condition do |controller|
Comments
No one has commented yet.