Sha256: dcf584c24c124ecd9dda1948a59bfabf7841fdc6b061fdd4c5a61d0722a58083

Contents?: true

Size: 1.06 KB

Versions: 17

Compression:

Stored size: 1.06 KB

Contents

# Test cases for test_plugin_helper.rb
require File.expand_path('../test_helper', __FILE__)
require File.expand_path('../test_plugin_helper', __FILE__)

class TestPluginHelper < TDiary::PluginTestCase
	def test_absolute_path_of
		abspath = File.expand_path(File.join(File.dirname(__FILE__), '..', 'plugin', '00default.rb'))
		assert_equal(abspath, TDiary::PluginTestHelper.absolute_path_of('plugin/00default.rb'))
	end

	def test_resource_absolute_path_of
		abspath = File.expand_path(File.join(File.dirname(__FILE__), '..', 'plugin', 'en', '00default.rb'))
		assert_equal(abspath, TDiary::PluginTestHelper.resource_absolute_path_of('plugin/00default.rb', 'en'))
	end

	def test_resource_relative_path_of
		abspath = File.join('plugin', 'en', '00default.rb')
		assert_equal(abspath, TDiary::PluginTestHelper.resource_relative_path_of('plugin/00default.rb', 'en'))
	end

	def test_load_plugin_en
		assert_nothing_raised{load_plugin('plugin/00default.rb', 'en', binding)}
	end

	def test_load_plugin_ja
		assert_nothing_raised{load_plugin('plugin/00default.rb', 'ja', binding)}
	end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tdiary-4.0.2 test/test_plugin_helper_test.rb
tdiary-4.0.1.20131102 test/test_plugin_helper_test.rb
tdiary-4.0.1.20130929 test/test_plugin_helper_test.rb
tdiary-4.0.1.20130903 test/test_plugin_helper_test.rb
tdiary-4.0.1 test/test_plugin_helper_test.rb
tdiary-4.0.0.20130826 test/test_plugin_helper_test.rb
tdiary-4.0.0 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130727 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130722 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130720 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130617 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130614 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130604 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130527 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130518 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130508 test/test_plugin_helper_test.rb
tdiary-3.2.2.20130507 test/test_plugin_helper_test.rb