aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2013-03-27 19:53:24 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2013-04-04 11:33:44 +0900
commita9d6778796d69ab2ecc2a5fa63f79338521dc456 (patch)
treee5e462d8add03f45f8689380e978c0ae69734702 /test
parent682736becaf21003f5be8decf8a771dd9e604683 (diff)
downloadmikutter-a9d6778796d69ab2ecc2a5fa63f79338521dc456.tar.gz
miquireにspecファイル関連のサポート
Diffstat (limited to 'test')
-rw-r--r--test/core/test_miquire.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/core/test_miquire.rb b/test/core/test_miquire.rb
index 7394904b..01817df5 100644
--- a/test/core/test_miquire.rb
+++ b/test/core/test_miquire.rb
@@ -41,8 +41,22 @@ class TC_Miquire < Test::Unit::TestCase
miquire :allfiles
end
- # must "enum plugins" do
- # Miquire::Plugin.loadpath << 'addon/'
- # end
+ must "get plugin slug by path (spec exist)" do
+ assert_equal(:rest, Miquire::Plugin.get_slug(File.expand_path(File.join(File.dirname(__FILE__), '../../core/plugin/rest/'))))
+ end
+
+ must "get plugin slug by path (spec not exist)" do
+ Miquire::Plugin.stubs(:get_spec).returns(false)
+ assert_equal(:rest, Miquire::Plugin.get_slug(File.expand_path(File.join(File.dirname(__FILE__), '../../core/plugin/rest/'))))
+ assert_equal(:rest, Miquire::Plugin.get_slug(File.expand_path(File.join(File.dirname(__FILE__), '../../core/plugin/rest/rest.rb'))))
+ end
+
+ must "to_hash plugin slug and path" do
+ p Miquire::Plugin.to_hash
+ end
+
+ must "load a plugin and depends" do
+ #Miquire::Plugin.load(:home_timeline)
+ end
end