[rspec-users] Cucunber - does not honour here-document syntax?

James Byrne lists at ruby-forum.com
Wed May 6 10:35:21 EDT 2009


something_steps.rb

TEST = 'A constant'

puts TEST

SCRIPT <<-'END_SCRIPT'
...
END_SCRIPT

Then /.../ do

$ cucumber -r features features/lib/something.feature
A constant
./features/lib/step_definitions/something__steps.rb:9: undefined method
`SCRIPT' for #<Object:0x2ba6d15d23e0> (NoMethodError)
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
        from
/usr/lib64/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
`require'
        from
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in
`require'
        from
/usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/../lib/cucumber/cli/main.rb:79:in
`require_files'
        from
/usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/../lib/cucumber/cli/main.rb:77:in
`each'
        from
/usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/../lib/cucumber/cli/main.rb:77:in
`require_files'
        from
/usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/../lib/cucumber/cli/main.rb:34:in
`execute!'
        from
/usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/../lib/cucumber/cli/main.rb:20:in
`execute'
        from /usr/lib64/ruby/gems/1.8/gems/cucumber-0.3.2/bin/cucumber:6
        from /usr/bin/cucumber:19:in `load'
        from /usr/bin/cucumber:19
$

Is this a deliberate limitation in Cucumber or a bug?
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list