RailsApps / rails3-devise-rspec-cucumber

An example Rails 3.2 app with Devise and RSpec and Cucumber.
http://railsapps.github.io/
444 stars 144 forks source link

syntax error, unexpected '<' #32

Closed krishnaprasadk closed 12 years ago

krishnaprasadk commented 12 years ago

After type the following command

bundle exec cucumber features/visitors/request_invitation.feature --require features

the error message is displayed

/home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/spec/factories.rb:1: syntax error, unexpected '<' <!DOCTYPE html> ^ /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/spec/factories.rb:2: syntax error, unexpected '<'

^ /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/spec/factories.rb:4: syntax error, unexpected '<' ^ /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/spec/factories.rb:5: syntax error, unexpected '<' ^ /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/spec/factories.rb:5: syntax error, unexpected tIDENTIFIER, expecting $end ^ (SyntaxError) /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in`block in load' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in `load_dependency' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in`load' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-3.0.0/lib/factory_girl/find_definitions.rb:16:in `block in find_definitions' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-3.0.0/lib/factory_girl/find_definitions.rb:15:in`each' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-3.0.0/lib/factory_girl/find_definitions.rb:15:in `find_definitions' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl_rails-3.0.0/lib/factory_girl_rails/railtie.rb:26:in`block in class:Railtie' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in `call' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in`execute_hook' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in`each' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/finisher.rb:56:in`block in module:Finisher' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:30:in`run' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:54:in`each' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application.rb:96:in`initialize!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-rails-1.3.0/lib/cucumber/rails/application.rb:15:in `initialize!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in`method_missing' /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/config/environment.rb:5:in `' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:7:in`require' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:7:in `' /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/features/support/env.rb:7:in`require' /home/prescience/Documents/RSpec Example/rails3-devise-rspec-cucumber/features/support/env.rb:7:in `' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in`load' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:171:in`load_file' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in`each' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `load_files!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:175:in`load_step_definitions' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:40:in `run!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:43:in`execute!' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:20:in `execute' /home/prescience/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.1.9/bin/cucumber:14:in`' /home/prescience/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in `load' /home/prescience/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in`
' Also i changed the config/cucumber.yml as follws.That is changed the std_opts line.. <% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" std_opts = "-r features/support/ -r features/step_definitions --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip" %> default: <%= std_opts %> features wip: --tags @wip:3 --wip features rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
DanielKehoe commented 12 years ago

I'm confused. The rails3-devise-rspec-cucumber app does not have a feature file "visitors/request_invitation.feature". That feature file exists in a different example app, the rails-prelaunch-signup app. I will close this issue here since it is not relevant to the rails3-devise-rspec-cucumber app. If you are still having this problem with the rails-prelaunch-signup app, please open an issue there.

-- Daniel

krishnaprasadk commented 12 years ago

I have gone through my programs..It's my mistake..Sorry for this incident...

shadowbq commented 12 years ago

It is brought up because it still exists as an example of running an individual test in the corresponding tutorial.

Run Single Features Easily You can run a single Cucumber feature with a command such as:

$ bundle exec cucumber features/visitors/request_invitation.feature --require features