Please report a bug if this causes problems. $ cucumber features/scenarios/tracking.feature Users/mgraff/.rvm/gems/ruby-2.1.0/gems/cucumber-2.0.0/lib/cucumber/formatter/legacy_api/runtime_facade.rb:12:in `snippet_text' Users/mgraff/.rvm/gems/ruby-2.1.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:115:in `snippet_text' Users/mgraff/.rvm/gems/ruby-2.1.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:116:in `block in snippet_text' Users/mgraff/.rvm/gems/ruby-2.1.0/gems/cucumber-2.0.0/lib/cucumber/rb_support/rb_language.rb:61:in `snippet_text' Users/mgraff/.rvm/gems/ruby-2.1.0/gems/cucumber-2.0.0/lib/cucumber/rb_support/snippet.rb:13:in `initialize' Tag: undefined method `describe_to' for nil:NilClass * /Users/mgraff/Documents/workspace/pages/web/features/scenarios/tracking.feature Both ruby and cucumber in the config are the same as used for command line. I noticed in the rubymine console output that a tag i am using in my feature file appears with an extra environment variables are set in the run configuration. I am encountering the same issue in rubymine but everything runs fine from command line. #capybara.app_host ="" #if you have your own project, you can set your own app_host here.Īm just trying to do some examples from internet and i am following exact steps of what they do, where they get results and am not?Ĭan anyone help me in solving this, as am blocked in this stage itself. Require File.expand_path( "./Common_Lib", _FILE_) #requireĬapybara.register_driver :selenium_ff do | app|Ĭapybara:: Selenium:: Driver.new( app, :browser => :firefox)Ĭapybara.register_driver :selenium_ie do | app|Ĭapybara:: Selenium:: Driver.new( app, :browser => :internetexplorer)Ĭapybara.register_driver :selenium_chrome do | app|Ĭapybara:: Selenium:: Driver.new( app, :browser => :chrome)Ĭfault_driver = :selenium_ff #set the browser you want to run the test on NoMethodError: undefined method `describe_to' for nil:NilClass Installed all gems, like activesupport, selenium-client,selenium-webdriver,rspec,capybara,cucumber,gherkin.Ĭ:\Ruby193\bin\ruby.exe -EUTF-8 -e $stdout.sync=true $stderr.sync=true load($0=ARGV.shift) C:\Ruby193\bin/cucumber "D:/Automation/Ruby/Working Folder/Firstproject/Features/first.feature" -format Teamcity::Cucumber::Formatter -expand -name "^Check validation of Google Sign Up page$" -color -r features I tried all possible ruby installer from 1.9.3, 2.1.6 & 2.2.2 I am doing this from windows 8 environment. ![]() Looks odd, maybe it should be params instead.Am new to Ruby world and i am trying to automated a webapp around Ruby + selenium + cucumber + rspec + capybara. You might want to revisit your testimonial_member_id method as well, this: def testimonial_member_id I'm not sure of the logic for testimonials so you might be able to go with something more like: def = Testimonial.find_by(member_id: testimonial_member_id) The low precedence of and and or cause a lot of problems so you're better off sticking to & and ||. Your show template presumably needs a as well so you might want to say = testimonial.first before render 'show' too.Īlso, I've changed your and operator to & since you're generally better off pretending that and doesn't exist. But, notice that nothing in get_testimonial initializes so get_testimonial will end up trying to simple_form_for(nil).Ĭhanging the bottom of get_testimonial to something more like this: if invitations.any? & = Testimonial.new If you go through the get_testimonial controller, you can end up at: render 'new'Īnd that will render the HAML in question. May someone help me see why is returning nil? If the variable is the same I'm passing on the new function?ĪFAIK will try to call so that's where the problem most likely originates. Params.require(:testimonial).permit(:text) If invitations.any? and testimonial.blank?ĭef = Testimonial.find(testimonial_member_id) Invitations = current_user.workshop_invitations.accepted_or_attended Testimonial = Testimonial.where(member_id: testimonial_member_id) The controller is the following: class TestimonialsController < ApplicationController = f.submit 'Submit testimonial', class: 'button' = sanitize('Any testimonial along with your name and profile picture might be used for the promotion of codebar (website, prospectus, etc).') Placeholder: 'Use this space to write a testimonial about the event(s) you participated.' ![]() I'm receiving this error when trying to render the haml below: %section#banner The error: undefined method `model_name' for nil:NilClass (NoMethodError)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |