cucumber

Tutorial for using cucumber and rspec with .net apps

Are there any good tutorials out there for using cucumber and rspec for testing .net applications? ...

How can I get Capybara @javascript tags executing correctly in Cucumber on a Rails 3 project?

I've swapped out Webrat for Capybara on a new Rails 3 project. I ran through Tim Riley's great post on it here ( http://openmonkey.com/articles/2010/04/javascript-testing-with-cucumber-capybara ), and also cloned his repository, executed the example cucumber feature, and saw the browser window fire open. So the whole Cucumber, Capybara, ...

Cucumber newb question..

I am having trouble showing a mock logged in user in cucumber. When a user is logged in they can, make a post. My Errors: (::) failed steps (::) undefined local variable or method `user' for #<Cucumber::Rails::World:0x85974df4> (NameError) ./features/step_definitions/tasklist_steps.rb:25:in `/^that I want to post a link$/' featur...

How many use Rspec for controllers and views?

Are there strong reasons for using Rspec for controllers and views too? My views are heavily dependent on Javascript, and as far as I know, Rspec doesn't handle javascript/ajax on views. Also im using Cucumber + Selenium for that. And should I use it for controllers? Isn't it enough to just use Cucumber + Selenium for the application ...

Cucumber step definition for "Given that I'm logged in"

I've got a cucumber step: Given that I'm logged in I don't understand how I should implement it as a step definition. Could someone point me into right direction, tutorials, blogs etc. ...

cucumber problem when running with @javascript

When I run my feature file without javascript, it passes all tests in flying colors(okay, just one color, green) anyway, when I add @javascript to my last scenario, it suddenly fails the test. I tried tracing the problem by outputing it with puts: this is the culprit line: Then /^the "([^"]*)" option should be selected from the "([^"]*...

Rails 3 route name

Im using Cucumber + Capybara. This is how one of my step definitions looks like. When /^(?:|I )go to (.+)$/ do |page_name| visit path_to(page_name) end And here is my routing file: match "home" => "home#index" resources :searches root :to => 'firstpage#index' What is the name of a path? ...

Cucumber Help in Rails 3

I am very new to cucumber and rspec, but do have some rails and ruby understanding. The gems in question are: Devise, Declarative_Authorization, and role_model Rails 3 is what I am using and ruby 1.9.2-rc2 remember I do NOT know what I am doing I have written a Feature: Feature: As the administrator of the site give me quick access ...

Mixing Then and When in BDD User Stories/Acceptance Tests

How do you handle user stories/acceptance tests that have long chains like this one, where the Then/When mingle together? Is it best to split this into a separate acceptance test where one tests that the dialog appears and then the second one tests the behavior after the dialog has been shown? Feature: Confirmation before removing prod...

Get "Response code = 500" error randomly when running cucumber

For some reason I keep getting a response code of 500 when I run cucumber, even though all the tests pass. The error occurs randomly for different tests, every time I run it. Sometimes all tests pass as well. I thought it was a memory issue, so I tried restarting my computer, but that didn't do anything. An example of the error is: ...

Textmate bundles not working anymore

I just upgraded my OS to Snow Leopard 10.6.4(from 10.6.3). I then resumed coding and suddenly my Textmate wasn't recognizing my Haml file. It just said it was plain text. I looked into where my bundles were and I saw everything there including the Haml/Sass Bundle. So I figured I could just reinstall, so I deleted the bundle, got it fr...

Webrat (web_steps.rb) not being used

When I execute the following cucumber script: Feature: Manage Customers In order to store customers As a user I want to create and manage customers Scenario Outline: Create Customer Given I am on new customer screen When I fill in Name with "Test Company" And I press "Create" Then I should see "Custome...

Rails + cucumber + webrat + selnium : Periodic error on first scenario in feature

I have setup cucumber+webrat+selenium to test my rails app. This works well locally, and works about 50% of the time on my build (CI) server. The other 50% of the time, the first scenario in each feature fails with this error: Failed to start new browser session, shutdown browser and clear all session data Back trace starts with: or...

Undefined webrat methods in cucumber step_definitions

Hi there, When i run my features i get this error: undefined method `visit' for #<Cucumber::Rails::World:0x81b17ac0> (NoMethodError) This is the relevant part of my Gemfile. group :development, :test do gem "rspec-rails", ">= 2.0.0.beta.19" gem "cucumber" gem "cucumber-rails", ">= 0.3.2" gem 'webrat', ">= 0.7.2.beta.1" end ...

Cucumber prevent from clearing database

Hello, due to a heavy growing project I'm running into the trouble that the database rebuild process of cucumber really takes a long time. Since it is a application where the actual content of the table doesn't matter, I'd like to skip the rebuild process. Unfortunately wether cucumber nor database_cleaner seem to support this, doesn'...

Where I can learn Cucumber in detail?

I am new on Ruby on Rails testing. I have seen many testing tools, such as Rspec,Cucumber,Seleneium,Watier etc. but could not detail information about that. Please give me a link for this. ...

Rails 3 Cucumber Load Error

I am trying to get cucumber to work with Rails 3. But whenever I try to run the cucumber features I get an load error. cucumber-0.7.3/lib/cucumber/ast/feature_element.rb:2:in `require': no such file to load -- gherkin/parser/tag_expression (LoadError) I have added the following gems to the Gemfile gem "rspec", '>= 2.0.0.beta.19' gem ...

How to solve an "uninitialized constant Cucumber" error?

Hi! I'm trying to get one open source application up and running. But unfortunately I'm getting the following error: rake aborted! uninitialized constant Cucumber I have already tried installing Cucumber with the following line. That dowloaded the ".\vendor\plugins\cucumber\" folder, but that error remains the same. script/plugin ...

How can I make cucumber with capybara and selenium fire Ajax on page load

I have the following as a cucumber story: @javascript Scenario: Showing the page Given I am a logged in user And there is a member with a site And I go to the home page ..... When that home page is loaded, there is a drop down that is populated via AJAX on page, in the selenium run browser test the $(document).ready(funtion...

Routing problem with cucumber

hello coders and codetts I am working with rails 3 and cucumber, all is going well except for this little problem Given I am on the "edit automobile" page No route matches {:controller=>"automobiles", :action=>"edit"} (ActionController::RoutingError) Now the path is set in paths.rb as edit_automobile_path and in the routes.rb I ha...