similar to: Getting user session object in cucumber

Displaying 20 results from an estimated 700 matches similar to: "Getting user session object in cucumber"

2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
I have searched a lot for a solution, but I could not find it! I am trying to make a rails application after watching Michael Hartl''s tutorial and when i fill data manually and submit it nothing happens and nothing records in the Mailers table and I am facing the following error: Failures: 1) Mailer pages mail us with valid information should send a mail Failure/Error: expect
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
Hey list, Anyone have experience with acts_as_xapian and Cucumber? I''m struggling with updating xapian''s index, to actually "find" fluff that has been indexed.. In a scenario, I''m adding a bunch of articles, and in the actual search step, I run: When "I search for \"$query\"" do |query| %x[rake RAILS_ENV=test xapian:update_index]
2013 May 12
10
Capybara with redirect
I am having an issue where a feature works fine but the corresponding test fails, and I can''t understand why. I created a mock application to demonstrate the problem. https://github.com/assafshomer/clear_button All it does is show an input form with a clear button. The clearing happens by redirecting back to the same form. It does clear it when you run the app, but the test for it
2010 Dec 20
1
Check whether link present nor not using cucumber
Hi, I am using cucumber with webrat for testing my application. I have admin role in my application. When admin logs into the system he able to see the "Users" link which gives an interface to manage users for admin. I have written the feature like as follows:- Feature: List All Users So that Admin can manage users Scenario: Login as Admin When I login with user "username"
2008 Dec 02
4
Using Cucumber with latest Webrat
I added cucumber to my rails project using the following commands: git submodule add git://github.com/aslakhellesoy/cucumber.git \ vendor/plugins/cucumber ruby script/generate cucumber git submodule add git://github.com/brynary/webrat.git \ vendor/plugins/webrat git submodule add git://github.com/dchelimsky/rspec.git \ vendor/plugins/rspec git submodule add
2009 May 06
0
Cucumber, Webrat, RSpec and Mechanize for Non-Ruby Apps
The folks here have given me the task of figuring out if cucumber can be used successfully to test some of our apps. I have the latest versions of rails, mechanize, cucumber webrat and rspec installed. #/cuketest/features/google.feature Feature: New PC In order to get a sweet new PC As a apple nerd I want to find apple.com Scenario: Get a sweet new computer Given I visit
2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
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
2010 Dec 21
1
Matching 2 SQL tables
Hi, I have a postgresql and a mysql database and I would like to combine the info from two different tables in R. Both databases contain a table with three columns: project_name, release_id and release_date. So each project output could be released multiple times (I am interested in the first release_date). However, some of the data is missing. Basically, what I want to do is to try and fill the
2006 Apr 26
2
Retrieving :id without passing it
Ok, I have read most of Agile Web Dev... so I had a question about beautifying URLs using routes.rb. I''m trying to architect a content management system in which a user can create template pages. This way, when a user creates a template page nested within, it displays it as though it''s displaying a folder structure, much like a directory tree (using acts_as_tree). I have a
2006 Jan 09
7
Large select list, speed issues
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Verdana">I have a piece of code in my page to generate
2005 Jun 24
14
apache2 fastcgi (fcgi) internal server errors, still :(
hi all, I can blab, but here is a sample of my /var/log/apache2/error.log, it has all the info: any ideas what I can do prevent 500s from hitting my users? (besides redirecting them with javascript to the same URL which will be fine on the next request? :) thanks, _alex [Fri Jun 24 12:30:45 2005] [error] [client 172.20.0.175] FastCGI: incomplete headers (0 bytes) received from
2006 Feb 12
4
How do I emulate directory structure with routes?
I''ve got something that I''m not sure is actually doable. I have a very complex model relationship with a lot of parent/child/grandchild/ greatgrandchild etc stuff going on. Is there a way to do a route like this? tld.com/ projects/:project_name/:sequence_acronym/:shot_number/:department/:eleme nt_name/:version/ where: project is the parent of sequence sequence is the
2006 Aug 24
5
Unable to start with Capistrano...
I''ve created a couple of tasks in my deploy.rb file for starting and stopping backgroundrb on the remote server. The stop task runs fine and kills the process. And the start task *seems* to run successfully, but backgroundrb is never started on the remote host. Has anyone had success with this? Here are my deploy tasks: desc ''Start backgroundrb server (default
2006 Jun 16
15
Mongrel_rails restart and sudo
Sorry for the newbie question but I''m stumped: I have an app that requires sudo to run mongrel_rails. For my capistrano recipe is do it like this: sudo "mongrel_rails start -e production -p #{application_port} -d -c #{current_path}" Which works famously. Now I have tried several things for my restart task. Here they are: sudo "cd #{current_path} && sudo
2009 Jul 31
6
Background daemon
It''s sending e-mail every hour, but I changed to sleep for a day, but keep send the e-mail by hour. I don''t know what to do to send daily. Could somebody help me? thanks ############ # mailer.rb ############### #!/usr/bin/env ruby # You might want to change this ENV["RAILS_ENV"] ||= "production" require File.dirname(__FILE__) +
2006 Apr 03
2
Capistrano - how do I set up the database config?
My app is set up without database.yml in version control. I created a shared_path/config dir, and put database.yml in it. After I update the code, I want to link the app''s database.yml file to the shared config. So I added this task desc ''Copy the database config'' task :after_update_code, :roles => :app do run "ln -s #{shared_path}/config/database.yml
2009 Apr 04
1
Rails 2.3.2 - template question
Simplest of template files, tst.rb, contains: PROJECT_NAME = File.basename(RAILS_ROOT) run ''echo '' + PROJECT_NAME Running command "rails tst -m ~/Rails_Tools/tst.rb" produces: create create app/controllers . . create log/development.log create log/test.log applying template: /Users/rick/RailsTools/tst.rb Anonymous modules
2007 Feb 05
3
Deploying to production with backgroundrb (capistrano)
I have noticed that occasionally (about 50% of the time) when i deploy (using capistrano) my app to a production server, i have to ssh into the box and manually stop and start backgroundrb to get it to load my workers. this is my basic setup i have 2 workers: lib/workers/mp3_worker.rb => takes a hash of params to downsample an mp3 lib/workers/flv_worker.rb => takes a has of
2015 Dec 11
2
libvirt domain configuration xml
I am trying to change a domain configuration from a python script. More specific, I want to edit the VNC settings. You can't do this using the libvirt API so you have to edit the domain configuration: Fo exmple, to disable VNC for a domain 'test1': vmXml = vm.XMLDesc(0) root = ET.fromstring(vmXml) devices = root.find('./devices') graphics = devices.find('graphics')