Created
September 11, 2012 16:53
-
-
Save anlek/3699797 to your computer and use it in GitHub Desktop.
Output of cucumber features (for mongify)
This file contains hidden or 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
{21:20}[1.9.3-p194]~/code/rails_apps/mongify:master ✓ ➭ cucumber features | |
Feature: Mongify can be controlled using command-line options | |
In order to change Mongify's default behaviour | |
As a user | |
I want to supply options on the command line | |
Scenario: returns non-zero status on bad options # features/options.feature:6 | |
When I run mongify --no-such-option # features/step_definitions/mongify_steps.rb:1 | |
Then the exit status indicates an error # features/step_definitions/mongify_steps.rb:26 | |
And it reports the error "Error: invalid option: --no-such-option" # features/step_definitions/mongify_steps.rb:30 | |
And stdout equals "" # features/step_definitions/mongify_steps.rb:5 | |
Scenario: display the current version number # features/options.feature:12 | |
When I run mongify --version # features/step_definitions/mongify_steps.rb:1 | |
Then it succeeds # features/step_definitions/mongify_steps.rb:17 | |
And it reports the current version # features/step_definitions/mongify_steps.rb:22 | |
Scenario: display the help information # features/options.feature:17 | |
When I run mongify --help # features/step_definitions/mongify_steps.rb:1 | |
Then it succeeds # features/step_definitions/mongify_steps.rb:17 | |
And it reports: # features/step_definitions/mongify_steps.rb:9 | |
""" | |
Usage: mongify command [database_translation.rb] [-c database.config] | |
Commands: | |
"check" or "ck" >> Checks connection for sql and no_sql databases [configuration_file] | |
"process" or "pr" >> Takes a translation and process it to mongodb [configuration_file, translation_file] | |
"translation" or "tr" >> Outputs a translation file from a sql connection [configuration_file] | |
Examples: | |
mongify check -c database.config | |
mongify translation -c datbase.config > database_translation.rb | |
mongify process database_translation.rb -c database.config | |
See http://github.com/anlek/mongify for more details | |
Common options: | |
-h, --help Show this message | |
-v, --version Show version | |
-c, --config FILE Configuration File to use | |
""" | |
Feature: Database Translation Output | |
In order to translate sql database to a no-sql database | |
As a developer / database admin | |
Needs to be able to generate a translation file | |
Scenario: Translation Output request # features/print.feature:6 | |
Given a database exists # features/step_definitions/mongify_steps.rb:36 | |
When I run mongify translation -c spec/files/base_configuration.rb # features/step_definitions/mongify_steps.rb:1 | |
Then it succeeds # features/step_definitions/mongify_steps.rb:17 | |
And it should print out the database schema # features/step_definitions/mongify_steps.rb:40 | |
Feature: Processing a translation | |
In order for Mongify to be useful | |
As a user | |
I want to be able to process a translation and move my data to mongodb! | |
Scenario: Process # features/process.feature:6 | |
Given a database exists # features/step_definitions/mongify_steps.rb:36 | |
And a blank mongodb # features/step_definitions/mongo_steps.rb:1 | |
When I run mongify process spec/files/translation.rb -c spec/files/base_configuration.rb # features/step_definitions/mongify_steps.rb:1 | |
Then it succeeds # features/step_definitions/mongify_steps.rb:17 | |
Copying users: (3/3) 100% |ooooo| Time: 00:00:00 | |
Copying posts: (3/3) 100% |ooooo| Time: 00:00:00 | |
Embedding comments: (3/3) 100% |ooooo| Time: 00:00:00 | |
Embedding preferences: (3/3) 100% |ooooo| Time: 00:00:00 | |
Updating References users: (3/3) 100% |ooooo| Time: 00:00:00 | |
Updating References posts: (3/3) 100% |ooooo| Time: 00:00:00 | |
Polymorphicizing notes: (4/4) 100% |ooooo| Time: 00:00:00 | |
Removing pre_mongified_id users: (1/1) 100% |ooooo| Time: 00:00:00 | |
Removing pre_mongified_id posts: (1/1) 100% |ooooo| Time: 00:00:00 | |
And there should be 3 users in mongodb # features/step_definitions/mongo_steps.rb:5 | |
And there should be 3 posts in mongodb # features/step_definitions/mongo_steps.rb:5 | |
And the first post's user_id should be first user # features/step_definitions/mongo_steps.rb:9 | |
expected: BSON::ObjectId('504f6c567af8b4061f000003') | |
got: BSON::ObjectId('504f6c567af8b4061f000002') (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-BSON::ObjectId('504f6c567af8b4061f000003') | |
+BSON::ObjectId('504f6c567af8b4061f000002') | |
(RSpec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/mongo_steps.rb:10:in `/^the (first|second|third) (.+)'s (.+) should be (first|second|thrid) (.+)$/' | |
features/process.feature:13:in `And the first post's user_id should be first user' | |
And there should be 0 comments in mongodb # features/step_definitions/mongo_steps.rb:5 | |
And the post with title "First Post" should have 1 comment # features/step_definitions/mongo_steps.rb:13 | |
And the post with title "Second Post" should have 2 comments # features/step_definitions/mongo_steps.rb:13 | |
Scenario: Processing while modifying embedding parent. # features/process.feature:18 | |
Given a database exists # features/step_definitions/mongify_steps.rb:36 | |
And a blank mongodb # features/step_definitions/mongo_steps.rb:1 | |
When I run mongify process spec/files/embedded_parent_translation.rb -c spec/files/base_configuration.rb # features/step_definitions/mongify_steps.rb:1 | |
Then it succeeds # features/step_definitions/mongify_steps.rb:17 | |
Copying users: (3/3) 100% |ooooo| Time: 00:00:00 | |
Embedding preferences: (3/3) 100% |ooooo| Time: 00:00:00 | |
Updating References users: (3/3) 100% |ooooo| Time: 00:00:00 | |
Removing pre_mongified_id users: (1/1) 100% |ooooo| Time: 00:00:00 | |
And there should be 3 users in mongodb # features/step_definitions/mongo_steps.rb:5 | |
And the first user's notify_by_email attribute should be true # features/step_definitions/process_steps.rb:1 | |
And the third user's notify_by_email attribute should be false # features/step_definitions/process_steps.rb:1 | |
Failing Scenarios: | |
cucumber features/process.feature:6 # Scenario: Process | |
6 scenarios (1 failed, 5 passed) | |
31 steps (1 failed, 3 skipped, 27 passed) | |
0m4.571s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment