0
@@ -50,8 +50,8 @@ class CallbacksTest < Test::Unit::TestCase
0
assert_equal 'new name', company.name
0
- define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :if => condition
0
+ define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :if => condition
0
company = Company.new :name => 'thoughtbot', :flag => true
0
assert_raises(ActiveRecord::ActiveRecordError) do
0
@@ -59,8 +59,8 @@ class CallbacksTest < Test::Unit::TestCase
0
- define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :unless => condition
0
+ define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :unless => condition
0
company = Company.new :name => 'thoughtbot', :flag => false
0
assert_raises(ActiveRecord::ActiveRecordError) do
0
@@ -102,8 +102,8 @@ class CallbacksTest < Test::Unit::TestCase
0
assert_equal 'new name', company.name
0
- define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :if => condition
0
+ define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :if => condition
0
company = Company.create :name => 'thoughtbot', :flag => true
0
assert_raises(ActiveRecord::ActiveRecordError) do
0
@@ -111,8 +111,8 @@ class CallbacksTest < Test::Unit::TestCase
0
- define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :unless => condition
0
+ define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :unless => condition
0
company = Company.create :name => 'thoughtbot', :flag => false
0
assert_raises(ActiveRecord::ActiveRecordError) do
0
@@ -158,8 +158,8 @@ class CallbacksTest < Test::Unit::TestCase
0
- define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :if => condition
0
+ define_method "test_#{callback}_with_if_condition_#{condition.class}_which_returns_true_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :if => condition
0
company = Company.new :name => 'thoughtbot', :flag => true
0
@@ -168,8 +168,8 @@ class CallbacksTest < Test::Unit::TestCase
0
- define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_symbol" do
0
- Company.send callback.to_sym, "'puts #{callback}'", :unless => condition
0
+ define_method "test_#{callback}_with_unless_condition_#{condition.class}_which_returns_false_should_raise_an_exception_if_its_callback_is_not_a_supported_type" do
0
+ Company.send callback.to_sym, [], :unless => condition
0
company = Company.new :name => 'thoughtbot', :flag => false
Comments
No one has commented yet.