cucumber

Getting "undefined method" error on form select in cucumber

I'm trying to visit a page with cucumber, with: visit new_video_path but I get this error: undefined method `episode_id' for #<Video:0x22df8dc> (ActionView::TemplateError) On line #19 of app/views/videos/_form.html.erb ... 19: <%= select(:video, :episode_id, @episodes.collect {|e| [ e.title, e.id ] }, { :include_blank => true }) ...

Rails BDD with Cucumber: no such file to load -- cucumber-rails

I have project on Rails (2.3.5). I add into environment.rb same sting: config.gem "cucumber-rails", run "rake gems:unpack:dependencies". Output of "rake gems": [F] cucumber-rails [F] cucumber >= 0.6.2 [F] term-ansicolor >= 1.0.4 [F] treetop >= 1.4.2 [F] polyglot >= 0.3.1 [F] polyglot >= 0.2.9 [F] builder >= 2.1.2 [F] diff-lcs >=...

How to deal with hidden field with cucumber and webrat ?

I have to set a select date field with the month and day discarded. So Month and day are hidden in the form which caused a "undefined method `options' for # (NoMethodError)" when executing the cucumber scenario. How can i solve this issue and get the year correctly into the cucumber step ? ...

Why the cucumber features keeps running even though it fails?

Its a rails 2.3.5 app. I'm using the rspec and cucumber for testing. When I run autospec, it runs correctly with the warning (Not running features. To run features in autotest, set AUTOFEATURE=true.) as below: [~/rails_apps/automation (campaign)⚡] ➔ autospec (Not running features. To run features in autotest, set AUTOFEATURE=true.) (...

how to run .feature + _spec.rb + _test.rb with autotest

In one of my project with some existing code, some code is covered by _test.rb file, other is by _spec.rb and we introduced .feature It became a nice mixture of stuff to check. I am stumped how to run .feature, _spec.rb and _test.rb for red-green cycles. ...

When i run rake db:create ,Error rake aborted! uninitialized constant Cucumber

Hi I am trying to experiment on an open source application application . when i run $ rake db:create Following is the stacktrace rake aborted! uninitialized constant Cucumber /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443:in `load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-...

unexpected kENSURE, expecting $end - Rails/Cucumber/Haml

Been having a problem with Rails/Cucumber/Haml. The below Haml file works perfectly in the development and live environments but fails in Cucumber with the following error: /app/views/competitions/show.haml:30: syntax error, unexpected kENSURE, expecting $end (ActionView::TemplateError) On line #30 of app/views/competitions/show.haml ...

invalid option: --autospec

/usr/local/bin/ruby -rrubygems -e "require 'redgreen'" /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec --autospec <files_here> -O spec/spec.opts invalid option: --autospec Test::Unit automatic runner. Usage: -e [options] [-- untouched arguments] which spec says "/usr/local/bin/spec" which autospec says "/usr/local/bin/autospec"...

Cucumber and Silverlight 4

So I am wondering if anyone is familiar or has done any work with cucumber and Silverlight. I currently have a template directory and build file that will create RSpec tests using Bacon (light weight RSpec). I have been looking into SpecFlow and Cuke2Nuke but almost everything I have seen works with general .net code not silverlight co...

Weird problem: cucumber behaving differently when run with the debugger

When I run a cucumber test it executes the code thinking that a collection obtained inside of a controller via a has_many relationship on a model is empty when it isn't. I ran this same test but with the debugger turned on and a breakpoint before the collection is used. When I print collection in the debugger at this breakpoint the colle...

Help w/ Sluggish "rake cucumber"

I've been trying to debug some super slow performance in running my cucumber features. I've run various calls through ruby-prof and think I see the bottlenecks (not too familiar with using ruby-prof) but do not know the cause or more important the solution. I've include below the output from running rake cucumber. http://dl.dropbox.co...

changing selenium domain/subdomain within cucumber scenarios

So, I have a Rails webapp that utilizes subdomains for separating the admin functionality from the public functionality using subdomain-fu. So there is functionality(that I want to test!) contained within two urls(eg admin.example.com and www.example.com). I want some scenarios to run against the admin domain, and some against the www d...

Testing for javascript alerts with Capybara

I'm using Cumcumber + capybara + selenium to run automated testing, but I'm having trouble finding a way to assert that a javascript alert is displayed. This question seems has a solution with selenium, but I can't figure out how to call the selenium object using Capybara. Is there a simple way to test for alerts using Capybara? Or i...

can't run cucumber scenarios due to test-unit version issue on Rails 2.3.5, Ruby 1.9.1

I've been trying to follow along in the RSpec book, (I'm new to all of this) and I have what appears to be some kind of versioning issue. If I try and run some simple scenarios, I get this error: can't activate test-unit (= 1.2.3, runtime) for [], already activated test-unit-2.0.7 for [] (Gem::LoadError) /Users/jeffdeville/.rvm/ru...

How do I setup and utilize Shoulda, Factory_Girl, and Cucumber in a Rails 3 application?

I'm able to get my Gemfile how I like it: # Gemfile source "http://gemcutter.org" gem "rails", :git => "git://github.com/rails/rails.git" git "git://github.com/rails/arel.git" git "git://github.com/rails/rack.git" gem "sqlite3-ruby" group :test do gem "shoulda", :git => "git://github.com/thoughtbot/shoulda.git", :branch => ...

Authlogic Facebook Connect and cucumber

I added the authlogic_facebook_connect plugin to my project and I'm now having problem running my cucumber test because of a NoMethodError. undefined method `set_facebook_session' for nil:NilClass (NoMethodError) In authlogic_facebook_connect/Session.rb the method "authenticating_with_facebook_connect?" is called as some sort of callb...

Using Cucumber or RSpec+Selenium to create end user documentation?

Has anyone tried creating end user (potentially online, potentially to be printed) help/documentation out of your cucumber scenarios? Or taken screenshots for use in documentation using RSpec and Selenium RC's ability to do so? For Cucumber, I'm imagining something like: Scenario: If you want to add a link Given I am on the edit blog p...

pickle on jruby

Does anyone know if pickle is compatible with jruby? I just installed cucumber and cucumber-rails. I then tried gem install pickle and it installs, but a script/generate pickle yields Couldn't find 'pickle' generator I did everything according to the readme no dice. Anyone have any experience with this: specs jruby-1.4.0 rail...

Cucumber bundle not working in Textmate

I set up Aslak's Cucumber.tmbundle in Texmate, set up PATH in Shell Variables to /Users/gerhard/.rvm/bin:/Users/gerhard/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin but when I run any of the bundle commands I get this: env: sh\r: No such file or directory /usr/bin/env sh is in the search path, so what am I missing? ...

Cucumber-rails on jruby installs gem into my apps root directory with bundler

Just installed cucumber 0.7.2 and cucumber-rails 0.3.1 with jruby-1.4.0 on OSX. When I run a bundle install, it places a cucumber-rails directory in my main app with all of the gem code/dependencies. First off, this is definitely not what I want and I'm not sure why this happens for cucumber-rails only. Second, if I delete this folde...