Feature: collection proxy specification
Background: # features/collection_proxy.feature:3
Given the library works in development mode # features/steps/rod.rb:5
@wip
Scenario: deleting and appending items # features/collection_proxy.feature:89
Given the initial size of the collection proxy is 5 # features/steps/collection_proxy.rb:18
@wip
Scenario: deleting and appending items # features/collection_proxy.feature:89
Given the initial size of the collection proxy is 5 # features/steps/collection_proxy.rb:18
When I append a new item 5 times # features/steps/collection_proxy.rb:31
Then the size of the collection proxy should be 10 # features/steps/collection_proxy.rb:76
And the collection proxy should behave like an array # features/steps/collection_proxy.rb:81
When I delete an item at position 0 # features/steps/collection_proxy.rb:61
Then the size of the collection proxy should be 9 # features/steps/collection_proxy.rb:76
And the collection proxy should behave like an array # features/steps/collection_proxy.rb:81
When I delete an item with rod_id = 6 # features/steps/collection_proxy.rb:69
Then the size of the collection proxy should be 8 # features/steps/collection_proxy.rb:76
And the collection proxy should behave like an array # features/steps/collection_proxy.rb:81
When I append a new item # features/steps/collection_proxy.rb:31
Then the size of the collection proxy should be 9 # features/steps/collection_proxy.rb:76
And the collection proxy should behave like an array # features/steps/collection_proxy.rb:81
Feature: Access to objects with indexed fields
ROD allows for accessing objects via fields with indices.
Background: # features/flat_indexing.feature:4
Given the library works in development mode # features/steps/rod.rb:5
@wip
Scenario: simple indexing # features/flat_indexing.feature:8
Rod should allow to access objects via values of their fields,
for which indices were built.
Given the class space is cleared # features/steps/rod.rb:26
And the model is connected with the default database # features/steps/model.rb:84
And a class Caveman has a name field of type string with flat index # features/steps/model.rb:99
And a class Caveman has an age field of type integer with flat index # features/steps/model.rb:99
And a class Caveman has an identifier field of type ulong with flat index # features/steps/model.rb:99
And a class Caveman has a height field of type float with flat index # features/steps/model.rb:99
When database is created # features/steps/rod.rb:9
And I create a Caveman # features/steps/model.rb:142
And his name is 'Fred' # features/steps/model.rb:187
And his age is '25' # features/steps/model.rb:187
And his identifier is '111222333' # features/steps/model.rb:187
And his height is '1.86' # features/steps/model.rb:187
And I store him in the database # features/steps/model.rb:213
And I create another Caveman # features/steps/model.rb:142
And his name is 'Barney' # features/steps/model.rb:187
And his age is '26' # features/steps/model.rb:187
And his identifier is '111222444' # features/steps/model.rb:187
And his height is '1.67' # features/steps/model.rb:187
And I store him in the database # features/steps/model.rb:213
And I create another Caveman # features/steps/model.rb:142
And his name is 'Wilma' # features/steps/model.rb:187
And his age is '25' # features/steps/model.rb:187
And his identifier is '111222555' # features/steps/model.rb:187
And his height is '1.67' # features/steps/model.rb:187
And I store him in the database # features/steps/model.rb:213
And I reopen database for reading # features/steps/rod.rb:45
Then there should be 3 Caveman(s) # features/steps/model.rb:258
And there should be 1 Caveman with 'Fred' name # features/steps/model.rb:369
And there should be 1 Caveman with 'Wilma' name # features/steps/model.rb:369
And there should be 1 Caveman with 'Barney' name # features/steps/model.rb:369
And there should be 2 Caveman(s) with '25' age # features/steps/model.rb:369
And there should be 1 Caveman with '26' age # features/steps/model.rb:369
And there should be 1 Caveman with '111222333' identifier # features/steps/model.rb:369
And there should be 1 Caveman with '111222444' identifier # features/steps/model.rb:369
And there should be 1 Caveman with '111222555' identifier # features/steps/model.rb:369
And there should be 2 Caveman(s) with '1.67' height # features/steps/model.rb:369
And there should be 1 Caveman with '1.86' height # features/steps/model.rb:369
cp: RodTest::Caveman RodTest::TestModel
Rod::Model
And some Caveman with 'Fred' name should be equal to the first Caveman # features/steps/model.rb:418
Database not selected for class Rod::Model!
Provide the database class via call to Rod::Model.database_class. (Rod::MissingDatabase)
./lib/rod/model.rb:695:in `database'
./lib/rod/model.rb:142:in `count'
./lib/rod/model.rb:393:in `find_by_rod_id'
./lib/rod/collection_proxy.rb:45:in `[]'
./lib/rod/collection_proxy.rb:203:in `block in each'
./lib/rod/collection_proxy.rb:200:in `times'
./lib/rod/collection_proxy.rb:200:in `each'
./features/steps/model.rb:421:in `any?'
./features/steps/model.rb:421:in `/^some (\w+) with '([^']*)' (\w+) should be equal to the (\w+) (\w+)$/'
features/flat_indexing.feature:48:in `And some Caveman with 'Fred' name should be equal to the first Caveman'
And some Caveman with 'Barney' name should be equal to the second Caveman # features/steps/model.rb:418
And some Caveman with 'Wilma' name should be equal to the third Caveman # features/steps/model.rb:418
And the first Caveman with 'Fred' name should be equal to the first Caveman # features/steps/model.rb:425
And the first Caveman with 'Barney' name should be equal to the second Caveman # features/steps/model.rb:425
And the first Caveman with 'Wilma' name should be equal to the third Caveman # features/steps/model.rb:425
Failing Scenarios:
cucumber features/flat_indexing.feature:8 # Scenario: simple indexing
Rod should allow to access objects via values of their fields,
for which indices were built.
2 scenarios (1 failed, 1 passed)
58 steps (1 failed, 5 skipped, 52 passed)
0m4.520s
rake aborted!
Command failed with status (1): [bundle exec cucumber --tags @wip features/...]
So far it seems that the call to RodTest::Caveman.find_by_rod_id is not executed in the context of this class but Rod::Model class.
So far it seems that the call to RodTest::Caveman.find_by_rod_id is not executed in the context of this class but Rod::Model class.