aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-03-12 16:19:23 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-03-12 16:19:23 +0000
commit1ec43ea1fe74776c24e8b76716b11fe5477734ab (patch)
tree11170ee99a6fdb4afc7954d095f8e5d95a857056
parentf6cdca974f032e0a112a9326aff272fb55f281c8 (diff)
downloadpaludis-1ec43ea1fe74776c24e8b76716b11fe5477734ab.tar.gz
paludis-1ec43ea1fe74776c24e8b76716b11fe5477734ab.tar.xz
ruby: Fix ConfigAction, and {Info,Config}Action tests
Fallout from 22e3824 and c5223a1.
-rw-r--r--ruby/action.cc8
-rw-r--r--ruby/action_TEST.rb12
2 files changed, 10 insertions, 10 deletions
diff --git a/ruby/action.cc b/ruby/action.cc
index 0e68664..624092d 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -387,7 +387,7 @@ namespace
/*
* call-seq:
- * InfoAction.new -> InfoAction
+ * InfoAction.new(info_action_options) -> InfoAction
*/
VALUE
info_action_new(VALUE self, VALUE opts)
@@ -401,7 +401,7 @@ namespace
/*
* call-seq:
- * ConfigAction.new -> ConfigAction
+ * ConfigAction.new(config_action_options) -> ConfigAction
*/
VALUE
config_action_new(VALUE self, VALUE opts)
@@ -496,7 +496,7 @@ namespace
/*
* call-seq:
- * FetchAction.new -> FetchAction
+ * FetchAction.new(fetch_action_options) -> FetchAction
*/
VALUE
fetch_action_new(VALUE self, VALUE opts)
@@ -979,7 +979,7 @@ namespace
* An action for fetching.
*/
c_config_action = rb_define_class_under(paludis_module(), "ConfigAction", c_action);
- rb_define_singleton_method(c_config_action, "new", RUBY_FUNC_CAST(&config_action_new), -1);
+ rb_define_singleton_method(c_config_action, "new", RUBY_FUNC_CAST(&config_action_new), 1);
rb_define_method(c_config_action, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
rb_define_method(c_config_action, "options", RUBY_FUNC_CAST(&BoxedAction<ConfigAction>::options), 0);
diff --git a/ruby/action_TEST.rb b/ruby/action_TEST.rb
index f01fd6d..2dc3ccb 100644
--- a/ruby/action_TEST.rb
+++ b/ruby/action_TEST.rb
@@ -166,12 +166,12 @@ module Paludis
class TestCase_InfoAction < Test::Unit::TestCase
def test_create
- assert_kind_of InfoAction, InfoAction.new
- assert_kind_of Action, InfoAction.new
+ assert_kind_of InfoAction, InfoAction.new(InfoActionOptions.new)
+ assert_kind_of Action, InfoAction.new(InfoActionOptions.new)
end
def test_bad_create
- assert_raise ArgumentError do
+ assert_raise TypeError do
InfoAction.new('')
end
end
@@ -179,12 +179,12 @@ module Paludis
class TestCase_ConfigAction < Test::Unit::TestCase
def test_create
- assert_kind_of ConfigAction, ConfigAction.new
- assert_kind_of Action, ConfigAction.new
+ assert_kind_of ConfigAction, ConfigAction.new(ConfigActionOptions.new)
+ assert_kind_of Action, ConfigAction.new(ConfigActionOptions.new)
end
def test_bad_create
- assert_raise ArgumentError do
+ assert_raise TypeError do
ConfigAction.new('')
end
end