Hi,
I'm writing a little application in Sinatra and Datamapper, and I'm
using Cucumber and Capybara. I wanted to use pickle, so I added file
at support/pickle.rb with following content:
require 'pickle/world'
Pickle.configure do |config|
config.adapters = [ DataMapper::Resource]
end
Unfortunately i got this error:
uninitialized constant Pickle::Adapter::DataMapper
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
dependencies.rb:105:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
inflector.rb:364:in `constantize'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
inflector.rb:363:in `each'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
inflector.rb:363:in `constantize'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
core_ext/string/inflections.rb:162:in `constantize'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/config.rb:18:in
`adapter_classes'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/config.rb:18:in
`map'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/config.rb:18:in
`adapter_classes'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/config.rb:22:in
`factories'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/parser/matchers.rb:
41:in `match_factory'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/parser/matchers.rb:
49:in `match_indexed_model'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/parser/matchers.rb:
57:in `match_model'
(eval):2:in `capture_model'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/world.rb:14:in
`__send__'
/Library/Ruby/Gems/1.8/gems/pickle-0.4.2/lib/pickle/world.rb:14:in
`capture_model'
/Users/aleks/kumulator/sinatra-pong/features/step_definitions/
pickle_steps.rb:4
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
dependencies.rb:156:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/
dependencies.rb:156:in `require'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/
rb_support/rb_language.rb:141:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/
step_mother.rb:108:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/
step_mother.rb:100:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/
step_mother.rb:99:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/
step_mother.rb:99:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/
main.rb:56:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/
main.rb:25:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-0.8.5/bin/cucumber:8
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
I also tried to do:
config.adapters = [ :data_mapper ]
But the result was the same.
My application is here:
http://github.com/tjeden/sinatra-pong/tree/pickle
What I am doing wrong?
Regards,
Aleksander Dąbrowski