test/test.rb in octopress-ink-1.0.0.rc.3 vs test/test.rb in octopress-ink-1.0.0.rc.5
- old
+ new
@@ -1,9 +1,11 @@
require './test_suite'
ENV['JEKYLL_ENV'] = 'test'
@failures = []
+@git_user_name = `git config user.name`.chomp
+@git_user_email = `git config user.email`.chomp
build
test_dirs('Site build', 'site', 'expected')
@@ -66,7 +68,43 @@
+ source/_copy/pages/two.md'
})
test_dirs('Copy theme', 'source/_copy', 'copy_layouts_pages/_copy')
`rm -rf source/_copy`
+
+`git config user.name ''`
+`git config user.email ''`
+
+test_cmd({
+ desc: 'New plugin',
+ cmd: [
+ 'octopress ink new test-plugin',
+ 'rm -rf test-plugin/.git'
+ ]
+})
+
+`git config user.name "#{@git_user_name}"`
+`git config user.email #{@git_user_email}`
+
+test_dirs('New plugin', 'test-plugin', 'test-plugin-expected')
+
+`rm -rf test-plugin`
+
+`git config user.name ''`
+`git config user.email ''`
+
+test_cmd({
+ desc: 'New Theme',
+ cmd: [
+ 'octopress ink new test-theme --theme',
+ 'rm -rf test-theme/.git'
+ ]
+})
+
+`git config user.name "#{@git_user_name}"`
+`git config user.email #{@git_user_email}`
+
+test_dirs('New plugin', 'test-theme', 'test-theme-expected')
+
+`rm -rf test-theme`
print_results