How am I supposed to test the typical User <-habtm-> Groups story. My Users and groups are created with factory_girl, it means I don't know the group id so I cannot ask webrat to check the checkbox.
Thank you for any webrat steps hints
...
I am working on a Rails app that allows you to create a configuration and then launch a server at EC2 with this configuration.
So far I've been using cucumber for BDD and was very happy with that. However, now I want to pick a configuration and actually launch the server. Due to cost and performance issues I don't want to actually launch...
I used following step-definition with cucumber and webrat and everything worked fine:
Then /^I should see "([^\"]*)" worker in the workerlist/ do |number|
response.should have_selector("td.worker_name", :count=>number)
end
I have moved now to selenium and "somehow" the have_selector doesn't take a :count parameter anymore. I get fo...
I'm using gem bundler (v.0.9.6) and Rails 2.3.5, rubygems 1.3.6 and ruby 1.8.7 (On Snow Leopard). My Gemfile looks like this:
source :rubyforge
source "http://gems.github.com"
gem "rails", "2.3.5"
gem "ruby-debug"
gem "activemerchant", :require => 'active_merchant'
gem "hpricot"
gem "nokogiri"
gem "state_machine"
gem "fastercsv"
gem "y...
I'm trying to learn how to use cucumber and got this issue:
I have a form that as:
<p>
<%= f.label :name, "Nome" %><br />
<%= f.text_field :name %>
</p>
And in my cucumber feature I have:
And I fill in "name" with "Reitoria do Porto"
This make the test fail with:
And I fill in "name" with "Reitoria do Porto" ...
I am trying out Cucumber for the first time and I've come accross an issue. I am try to use RyanB's nifty authentication generator, but it seems I can't use the helper methods when running my Cucumber features.
Part of my feature giving me problems:
when I am on the new book page # features/step_defin...
I started migrating from cucumber + webrat to cucumber + capybara. Now the behavior of "I should see " seems to be somewhat different. Most of these fail now, although I didn't change anything on the page. I replaced the snippet that should be found with some stuff that is on every page and for some text it works and for other text it do...
Hi there!
I'm trying to debug a simple BDD test using cucumber. In order to do that, I inserted a debugger statement where I would like to break the control flow. But it seems that cucumber ignores this statement.
I'm running the tests executing:
rake cucumber:wip
It's rather simple, so I think the code isn' t worth pasting here. T...
I have a path defined:
when /the admin home\s?page/
"/admin/"
I have scenario that is passing:
Scenario: Let admins see the admin homepage
Given "pojo" is logged in
And "pojo" is an "admin"
And I am on the admin home page
Then I should see "Hi there."
And I have a scenario that is failing:
Scenario: Review fl...
I am trying to get highlighting for Cucumber to work with Textmate.
I already installed the Cucumber Textmate Bundle (which is supposed to include the highlighting).
I am working with Ryan Bates' Railscasts theme (description for it is in the about page) for textmate, but for some reason In order to, As a, I want, etc do not get highligh...
While testing a Sinatra app with Cucumber, Rack::Test was not able to find the cookie that my app created, even though I could clearly see that it was in the Rack::Test::CookieJar object by dumping it with "p".
...
I am using Cucumber, Webrat, and Pickle in conjunction.
When I write a scenario, I can do something like this:
Given a product exists with title: "Bread"
When I go to the edit page for that product
And I fill in "Title" with "Milk"
And I press "Save changes"
Then I should see "Successfully edited product."
And I should be on that car's ...
I set up Cucumber+Webrat+Selenium according to this article.
Whenever I run my server, though, I keep getting:
ERROR Server Exception: sessionId should not be null; has this session been started yet? (Selenium::CommandError)
Two hours on Google haven't done much for me. Could you please help out? Thanks!
I am working on Ruby 1.8.7 and R...
I am working with Cucumber and Capybara and am looking to test a basic javascript confirmation box. I am aware Capybara uses Selenium 2.0 (not RC) for its javascript testing.
Where can I find the documentation for testing a simple confirm js dialog and other features of capybara + selenium?
Thanks!
...
I am using Ruby on Rails with Cucumber and Capybara.
How would I go about testing a simple confirm command ("Are you sure?")?
Also, where could I find further documentation on this issue?
Thank you!
...
Hi, I am trying to to get cucumber to run with no luck. Here is the error I am seeing:
cucumber features Using the default profile... no such file to
load -- test/ (MissingSourceFile)
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
poly...
Given the following in Cucumber:
Given a car exists with title: "Toyota"
And I go to path "/cars"
And I follow "Toyota Page"
And I should be on path "/cars/CAR_ID"
Where CAR_ID is the ID of the car titled "Toyota".
How do I figure out that ID?
Thanks!
...
Hi,
I'm trying to stub a third party service that my metal talks to. It seems rspec mocks/stubs don't extend all the way to the Metal.
When I call stubbed methods on objects, it calls the original one and not the stubbed one.
Any idea of how I can have rSpec doubles extend all the way to the metal?
Thanks.
-Nash
...
Hi all:
Having a look at BDD frmaeworks and I can't help but wonder which one would suit us better.
I like cucumber because, they have been there doing bdd for a good while(since early 2008) and I like ruby, however, we are a .net shop and although I find Ruby very friendly, other people doesn't; and I think that is fair enough (to a p...
environment/cucumber.rb:
...
# gem dependencies
config.gem 'cucumber-rails', :lib => false, :version => '>=0.3.0' unless File.directory?(File.join(Rails.root, 'vend
config.gem 'database_cleaner', :lib => false, :version => '>=0.5.0' unless File.directory?(File.join(Rails.root, 'vend
config.gem 'webrat', :lib => false, :versi...