cucumber

Rake Test is failing

Snow Leopard, Test, Shoulda, Cucumber I am running rake test and getting this error: Any ideas? /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- RMagick (MissingSourceFile) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/...

TDD/BDD Rails Cucumber / RSpec duplication

Can someone please clarify using a SIMPLE user story the full slice of what Cucumber would be used for and what RSpec would be used for? I purchased the RSpec book the other day and have been going through it. The author seems to be quite vague at times. What I'm thinking of if the user story is something like (please excuse the synta...

Leaving a large dataset in the test database without reloading

I use cucumber to run integration tests. I have a very large (30,000+ record) stardard setup for testing. How can I leave that in the test.sqlite3 database without re-loading it ever? ...

How to learn/teach Gherkin for Cucumber

Hi, I'd like to enable the business analysts to be able to write all of their specs for features, scenarios and steps that is Cucumber friendly using Gherkin. I've read some of the basic info on the github site for Cucumber and from doing a quick Google search but wanted to know if there were recommended resources for getting non-techn...

Cucumber and/or RSpec with pure Java application using JRuby

After doing some stuff in Ruby on Rails with Cucumber, RSpec and Ruby BDD in general, comming back to JUnit in my Java apps feels like incredible pain to me. I just love the convenience that Ruby brings into testing. From what I understand, it should be theoreticaly possible to use Cucumber features, or even RSpec mocking with pure Java...

HTTP POST XML content from cucumber

I am trying to sending XML content through POST to a controller ('Parse') method ('index') in a simple Rails project. It is not RESTful as my model name is different, say, 'cars'. I have the following in a functional test that works: def test_index ... data_file_path = File.dirname(__FILE__) + '/../../app/views/layouts/in...

rspec testing views with internationalization ?

Hello, I want to make sure I have the right meta desc/keyword and title text in my view so I want to create rspec views tests for that. Now the real challange here is how to make it work across multiple languages. The way I've done it is: it "should have the right page title" do title = "some nice title here" response.should have_...

How to resolve Rails model namespace collision

The story so far: I have a rails app with a model named "Term". All is well until trying to install Cucumber. Upon running rake cucumber I get Term is not a class (TypeError) This happens because Cucumber includes another gem, 'term-ansicolor' (to do the nifty colored text output in the console), and term-ansicolor defines a modul...

Silencing Factory Girl logging

Just to clear the air, I am not some cruel factory master trying to silence working ladies. I am having a very annoying problem where when using Thoughtbot's factory girl in my specs, every time Factory.create(:foo) is used, the newly created ActiveRecord model instance is logged to the console. This makes looking at my console output ...

Why are my Cucumber tests keeping the MySQL connection alive after each scenario?

I was having a really odd problem in my cucumber tests that was causing scenarios that were passing individually, to fail when run with others in a feature. I deduced this was a MySQL related issue and sure enough, a co-worker came along and recommended I change my connection pool to a higher value in my database config. Lo' and behold, ...

Rails | Cucumber | acl9 | AccessDenied

Hi guys, I am ramping up Cucumber, and I am having a issue getting one of my first tests to pass. The exception I am getting is: And I visit the new contract screen Acl9::AccessDenied (Acl9::AccessDenied) /usr/local/lib/ruby/1.8/benchmark.rb:308:in `realtime' (eval):2:in `visit' ./features/step_definitions/manage_contracts_ste...

cucumber features --guess

Hi, I'm setting up my Authlogic user session features. And I'm in some kind of confusion. When I run: cucumber features I get some red errors Scenario: User signs in successfully # features/user_sessions.feature:21 Given a user exists with login: "sachin", password: "secret" # features/step_def...

Testing lockdown permission constraints with cucumber

I am trying to test the following permission using Cucumber set_permission(:edit_vacancies). with_controller(:admin__vacancies). only_methods(:edit, :update). to_model(:vacancy).where(:editor_ids).includes(:current_user_id) this is working as expected when I fire up the site in the browser, but not in cucumber. I guess it ...

Cucumber Table Diff and colspan

Hi guys, I love cucumber, and its table diff feature. But I, often use a td colspan to display the title of the table. And I can't seem to get the table diff to work when I use colspan. (Table diff expects a 2d array, and the colspan breaks it) Has anyone be able to get this to work. Thanks! Jonathan ...

Guidance on testing extremely long form with 20+ required fields, using Rspec / Cucumber

Hi all, Just wanted to get some opinions on how to go about testing an extremely long form with 20+ required fields. It seems like my Cucumber scenario could be like 25 lines long if I tried to describe every field that need to be filled in (something like "And I fill in "Name:" with blah, And I fill in "Address" with foo, etc.). If I ...

Stubbing Sinatra helper in Cucumber

I am currently struggling with stubbing out a helper method of my Sinatra app from within Cucumber. I have a Sinatra app with simple session authentication (by cookies) and I want to turn of authentication by stubbing out the logged_in? helper method for my Cucumber scenarios. There seems to be a problem with Sinatra and Cucumber conce...

Why Cucumber hook methods aren't lowercase?

Hi, Cucumber has a few different hook methods like Before, After or AfterStep. I was wondering - why doesn't these method names follow Ruby's naming conventions to write method names all lowercase? Thanks. ...

Cucumber::Rails::World NoMethodError for IntegrationTest methods

I have a set of Cucumber features that are successfully running on a Mac OS X 10.5 machine and a Windows XP machine. I tried running them on a Mac OS X 10.4 machine today and Cucumber can't find any of the ActionController::IntegrationTest methods on the Cucumber::Rails::World. I am receiving the following error when trying to send a ge...

Why can't my Rails app find the gems that are packaged with it?

I've got a Rails app making use of Cucumber and RSpec. We are storing the gems under vendor/gems and trying to get the app building (running tests) in a CI server. When I try to run our tests I'm getting the following error: Missing these required gems: cucumber >= 0.3.11 rspec-rails >= 1.2.6 When I run RAILS_ENV=test rake gems...

Cucumber Cleanup

SO Folk, Anyone around these parts know if you can keep Cucumber from cleansing test data at the end of a run? I've a few tests that continue to fail and I'd like to have a look at the data backing those tests... Any ideas? Thanks! Cory Wilkerson ...