Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arjan van der Gaag
authored and
Arjan van der Gaag
committed
Jul 11, 2012
1 parent
901520f
commit 275eff6
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Feature: packaging | ||
As an author | ||
I want to package my book and other files into a single archive | ||
So I can easily distribute it over the internet | ||
|
||
Background: | ||
Given a basic project | ||
|
||
Scenario: compressing book | ||
When I successfully run `rpub package` | ||
Then a file named "untitled_book.zip" should exist | ||
And the archive "untitled_book.zip" should contain file "untitled-book-0.0.0.epub" | ||
|
||
Scenario: custom package filename | ||
Given the default "config.yml" file with "package_file" set to "my_book.zip" | ||
When I successfully run `rpub package` | ||
Then a file named "my_book.zip" should exist | ||
|
||
Scenario: uncompiled book | ||
When I successfully run `rpub package` | ||
Then a file named "untitled-book-0.0.0.epub" should exist | ||
|
||
Scenario: help | ||
When I successfully run `rpub package -h` | ||
Then the output should contain "Compile your ebook to an ePub file and package it into an archive" | ||
|
||
Scenario: additional files | ||
When I successfully run `rpub package` | ||
Then a file named "untitled_book.zip" should exist | ||
And the archive "untitled_book.zip" should contain file "README.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
require 'aruba/cucumber' | ||
require 'zip/zip' | ||
SUPPORT_PATH = File.expand_path(File.join(*%w[.. .. .. support]), __FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ toc: true | |
max_level: 2 | ||
ignore: | ||
- README.md | ||
package_file: 'untitled_book.zip' | ||
package: | ||
- README.md |