search for: step_definition

Displaying 20 results from an estimated 23 matches for "step_definition".

Did you mean: step_definitions
2009 Apr 26
9
Problems running features with Textmate Cucumber bundle
I finally plunked down for the beta RSpec bundle and I''m working through the initial example. Although I''m a fairly experienced RSpec user, I''m stlll learning new tricks. Anyway, I''m going though the mastermind example, and everything is going well, except that I decided to also try out the Textmate bundle for Cucumber. I decided to use Ben Mabey''s
2009 Jan 17
10
Cucumber Scenario Outlines Output Insufficient
I''m having problems knowing what a scenario outline I''ve created is doing. In particular I have no idea about what steps are being matched when the outline is run so when I break something I can''t find out what is wrong. Is there any progress on getting better output for scenario outlines. TIA Andrew -------------- next part -------------- An HTML attachment was
2009 Jul 06
3
Rspec book issue (mastermind example)
Hey Everyone, Just a simple question. I have read and re-read the examples and I''m not getting the proper output. I''m on page 73/74 of the Rspec book and it says I should have "4 steps passed". I think the problem is within my /step_definition/mastermind.rb" file. It''s definitely not beyond me to make a mistake, but I have checked and double checked my code and it all looks fine via the book examples. Here''s the output I''m getting... ______________________________________________________ cucumber feature...
2008 Dec 10
1
Oddness with fieldnames containing an underscore
...uot; Then there should be 1 more user When I ''rake features'' it halts at the password_confirmation line... Scenario: Register new user # features/ manage_users.feature:16 Given I am on the new user page # features/ step_definitions/user_steps.rb:5 And I fill in "login" with "johnm" # features/ step_definitions/webrat_steps.rb:12 And I fill in "password" with "Lmmsoht" # features/ step_definitions/webrat_steps.rb:12 And I fill in "p...
2010 Dec 16
12
Capybara + radio buttons
How do I select a radio button when both id and name are identical?: <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="13" value="J24" checked="checked" id="forare">Ja <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="14" value="N24"
2008 Dec 02
4
Using Cucumber with latest Webrat
...upport/env.rb. The rake task "features" creates a command line that looks like: -I "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/lib" "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/bin/cucumber" --format pretty --require features/step_definitions/user_steps.rb --require features/step_definitions/webrat_steps.rb --require features/step_definitions/frooble_steps.rb --require features/support/env.rb features/manage_users.feature "support/env.rb" is required after "step_definitions/webrat_steps.rb". this should probably be...
2012 Jun 14
3
response.should have_content("1 movie") does not seem to work for me
...sees using save_and_open_page, the string definitely is there! Name: Comedy Contains 1 movie Edit | Back This is what Cucumber tells me: Scenario: Create movie in genre # features/create_movie.feature:7 Given a genre named Comedy # features/step_definitions/genre_steps.rb:1 When I create a movie Caddyshack in the Comedy genre # features/step_definitions/movie_steps.rb:1 Then Caddyshack should be in the Comedy genre # features/step_definitions/movie_steps.rb:10 expected there to be content "1 movie" in "" (RSpe...
2009 Mar 30
2
[Cucumber] Bug with background
...Given an admin user Philip exists When I login as Philip Then I should be logged in as Philip running the following scenario on its own causes an error Scenario: Admin should be able to run a feed # features/admin/manage_feeds.feature:23 Given an admin user Philip exists # features/step_definitions/accounts/creation.steps.rb:66 Validation failed: Login has already been taken, Email has already been taken (ActiveRecord::RecordInvalid) /Users/andy/Sites/mvor/vendor/plugins/object_daddy/lib/object_daddy.rb:210:in `generate!'' /Users/andy/Sites/mvor/vendor/plugins/object_daddy/li...
2010 Oct 14
1
Cucumber Selenium web step to verify value of input field
I have an input field with an id which has a value. The web_steps.rb method does not find the value. Is this the right step to use to check an input field? It works fine for a text_area but not an input. Scenario steps (tried both ways): Then the "travel_card_number_gate" field should contain "5" Then the "#travel_card_number_gate" field should contain "5"
2010 Dec 16
1
Ambiguous match error for Cucumber
...Task.create!(:description => desc) end When /^I go to the tasks page$/ do visit "/tasks" end " Whenever I am doing "rake cucumber:all" I am getting following error:- ".F- (::) failed steps (::) Ambiguous match of "I go to the tasks page": features/step_definitions/tasklist_steps.rb:5:in `/^I go to the tasks page$/'' features/step_definitions/web_steps.rb:19:in `/^(?:|I )go to (.+)$/'' You can run again with --guess to make Cucumber be more smart about it (Cucumber::Ambiguous) features/tasklist.feature:8:in `When I go to the tasks page'...
2009 Mar 04
5
Sinitra 0.9.1 Webrat 0.4.2 Cuc problem
Have created sample sinatra cucumber app as suggested on wiki. Tried both env.rb configurations from there and aslaks git repo. With this combination of gems I get the following error doing basic cuc tests When I visit ''/foo'' # features/step_definitions/general.rb:1 PATH_INFO must start with / (Rack::Lint::LintError) /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:16:in `assert'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:178:in `check_env'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/ra...
2009 Mar 19
6
[Cucumber 0.2] Failure to use should
...message: Account(id: integer, name: string, state: string, next_renewal_at: date, created_at: datetime, updated_at: datetime, full_domain: string, deleted_at: datetime, subscription_discount_id: integer, subscription_plan_id: integer) And the account should be created # features/step_definitions/create_account_steps.rb:31 undefined method `be_blank'' for #<ActionController::Integration::Session:0x349994c> (NoMethodError) features/create_account.feature:10:in `And the account should be created'' I print out the account class, which is a AR::B. Why cucumbe...
2012 Feb 02
1
Missing files with rails generate cucumber:install
when ranning cucumber:install and generate me this files <code> create config/cucumber.yml create script/cucumber chmod script/cucumber create features/step_definitions create features/support create features/support/env.rb exist lib/tasks create lib/tasks/cucumber.rake gsub config/database.yml gsub config/database.yml force config/database.yml </code> im searching for the path.rb inside support it didnt generate me one my cucumber version is cucumb...
2013 Jun 18
1
Rails 3 in action book: some files are not generated as written in the book
I''m reading "Rails 3 in action", chapter 3, p. 56. It is said that the Cucumber skeleton generator > rails generate cucumber:install has to also generate the definition for the first step of the Scenario "Given I am on the homepage" in the file "features/step_definitions/web_steps.rb" # file: features/step_definitions/web_steps.rb Given /^(?:|I )am on (.+)$/ do |page_name| visit path_to(page_name) end But it doesn''t. Also it doesn''t generate module NavigationHelpers along with the "features/support/paths.rb" file. Why does i...
2013 Jun 24
0
wrong number of arguments calling `request` (0 for 1) (ArgumentError)
...h cucumber-0.10.0 and cucumber-rails-0.3.2 but if I upgrade with cucumber-rails-1.2.1 or cucumber-rails-1.3.1 - at this line request.session[:user_id].should == Person.find_by_username(user).id I am getting bellow error. Then amitpandya should be logged in # features/step_definitions/session_steps.rb:11 wrong number of arguments calling `request` (0 for 1) (ArgumentError) ./features/step_definitions/session_steps.rb:12:in `/^(.*)\ should\ be\ logged\ in$/'' features/login.feature:23:in `Then amitpandya should be logged in'' Any help How can I fix it? Tha...
2009 Apr 27
2
[cucumber] Setting a constant in step definition
...#39;) > ??? RATE = BigDecimal.new(''30.00'') > ? end > end > > > My scenarios of my postage feature want to deal with two situations when the > THRESHOLD has been set to zero and to ''6.99''. The question is how can I set > the threshold in my step_definition. So I want to implement > > ? Given the postage threshold is 0.00 > ? Given the postage threshold is 6.99 > > > ?I''ve considered a number of ideas, but seem to keep on getting into complex > solutions for what I assume is something very simple. If THRESHOLD can change...
2010 Jan 12
8
tips on how to write a controller test for models associated with currently logged in user
I have a controller test here: http://gist.github.com/275616, which works fine when account is an independent model, however I want: an account to be a property of user, ( and created and associated when a user is) when the user goes to /account/edit it should on edit the account of the logged in user - I can make rails do this, but I''m utterly baffled how I should alter this test to
2009 Mar 09
10
Cucumber - RSpec matcher
...uot;/ do |name, legal| myentity = Entity.find_by_entity_common_name!(name.hll_keycase) myentity.entity_legal_name.should equal legal.hll_keycase end Which fails with this: And the entity named "Myuser" has a legal name "Myuser Legal Name" # features/app/models/entities/step_definitions/entity_steps.rb:20 expected #<ActiveSupport::Multibyte::Chars:0x2b4bb29e73d8 @wrapped_string="myuser legal name">, got "myuser legal name" (using .equal?) which to me says that I got what I expected (myuser legal name) but which fails the equality test nonetheless....
2007 Dec 20
19
Story runner rake task
What''s the status on a rake task for the story runner. If nothing is in progress, where could I start to try and build one? JD
2009 Jan 16
16
Testing arbitrary post action parameters
I am working on our (newly renamed) authentication feature. The current scenario is: Scenario: Non-administrators should not set administrator ability Given I have no users And I add a user named "admin" as an administrator And I add a user named "myuser" as not an administrator When the user named "myuser" authenticates And the user