similar to: simple story, extract link

Displaying 20 results from an estimated 1000 matches similar to: "simple story, extract link"

2007 Oct 16
6
RailsStory runner - empty response
I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + "/helper" Story "View Home Page", %{ As a user I want to view my home page So that I can get a birds eye view of the system }, :type => RailsStory do Scenario "Publisher with no videos" do When
2007 Oct 24
3
Working with the response DOM
Hi, Anyone know a way to traverse/query the DOM in a response? I''m trying to write reusable story step implementations and as much as possible want to work with the actual response from a previous GET. As an example, I often have buttons that POST/PUT a hidden value. My goal is a reusable step implementation that takes the button label and works the existing response DOM to make an
2007 Sep 23
4
Story Runner, autoincrementing
I''ve written a story and I run into a snag. I''ve written the create_forum method and told it to set the id to 1 but when it creates the forum the id is autoincremented. My forums table is empty but the id keeps incrementing the newest record on creation. When I run the story it comes out as something like 59 which fails my story because I''m asking it to look at /forums/1
2012 Jun 14
3
response.should have_content("1 movie") does not seem to work for me
Hey everybody I have worked quite to near the end of The RSpec Book, but now I''m having some troubles. I''m trying to get the last few Cucumber steps to work, which are: Then /^Caddyshack should be in the Comedy genre$/ do visit genres_path click_link "Comedy" save_and_open_page response.should have_content("1 movie") response.should
2007 May 29
12
questions rspec on rails
Hi, rather than flooding this list with separate emails, I''ve been queueing up questions using rspec with rails. (an irc channel would be nice too :) Here ya go... - Is there a way to test named routes? - Could I get an example how to test an ajax request (link_to_remote)? would that go in view? and/or in controller spec? - Can you assert which layout template is rendered in a
2008 Jun 02
2
get method under 1.1.4 in Stories is undefined
HI, After I upgraded to RSpec 1.1.4 (from git), my stories all failed. I was using Webrat and the first thing I noticed was the ''visits'' method was gone. I then backtracked to just using ''get'' and got the same undefined method exception. I confirmed it was still working in 1.1.3 Eventually, I got it to work doing this: in my first Given: @app =
2008 Jun 09
6
Selenium/Watir usage along side Webrat in story testing
This is related to Selenium/Watir usage along side webrat in story testing. MHS_Testing and Rspec-ui provide some great help for testing through frameworks like Selenium/Watir. But there is something missing, Webrat has changed the landscape somewhat with Acceptance Tests/Story Driven development. Now I have a choice: 1. Tests and rails process run as one test process (Webrat) 2. Use
2009 Jun 12
2
Automate a data load and merge
Hi R list, I would like to automate, or speed up the process from which I take several separate datasets, stored in .csv formate, import and merge them by a common variable. So far I have greatly sped up the loading process but cannot think of a way to automate the merger of all datasets into a common data.frame. My apologies if this has been covered, any R search suggestions are
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would like to test with RSpec. For that I use ''response.should have_text("foobar")'' in my spec file, but that leads to a Failure/Error: response.should have_text("enim") undefined method `has_text?'' for #<ActionController::TestResponse: 0xb6736944> I read here somewhere that webrat
2008 Dec 10
3
rspecing rjs - form.reset(''form'')
Hello, > > I couldn''t find much info on this. > > How do you rspec this: page.form.reset("form") > > I looked in the have_rjs source code and I can''t find anything on form > reset. > > Thanks, > > -- > Andrei > -------------- next part -------------- An HTML attachment was scrubbed... URL:
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 Mar 13
2
[webrat] click link by title doesn''t work
Webrat 0.4.2 doesn''t seem to allow you to click links by title. Am I missing something stupid? With steps below running in sequence, first passes, second fails Then /^I should see a view (\w+) details link$/ do |object| response.should have_tag("a[title=#{object}_details]") end When /^I follow view (\w+) details link$/ do |object| click_link "#{object}_details}"
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2007 May 19
2
have_text matcher does not support should_not.
Hello Guys, Doing conversion of some test for some controllers, still with integrated views. Anyway, I have this: it "should not see Join This Group button on profile page as member" do get "show", :id => @group.id response.should be_success response.should_not have_text(/Join This Group/) end But running with spec (0.9.4), drop me the folling error:
2007 Oct 05
13
spec''ing view render partial collection, local variable not found
I''m trying to spec out a render partial collection but I get the following error 2) NoMethodError in ''/games/_game.rhtml should show game name'' undefined method `body'' for #<#<Class:0x316580c>:0x2f1154c> /Volumes/EXTERNAL/web/omenking.ca/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb:12:in `matches?''
2007 Oct 02
1
flash in story runner
hi, is there a way to assert a flash message directly in story runner? Or do I have to go through the response text instead. Then "flash message should say success" do #flash[:notice].should == "User successfully invited" response.should have_text(/User successfully invited/) end linoj
2007 Oct 16
5
RailsStory - lessons learned
After trying RailsStory for a few days, I have learned: 1. Rails testing support does not serve up static pages 2. RailsStory masks errors generated by the app under test 3. The masked errors are available in log/test 4. I should read log/test more often See http://pastie.caboo.se/107876 for an example for points 2 and 3 The welcome controller fails when the HTTP_USER_AGENT is missing.
2008 May 08
7
Rspec Stories / Selenium Nightmare
I have been using Rspec stories with Webrat feeling very productive and happy. Then I needed to do something with Selenium (Webrat could have done what I needed but it does not yet have the functionality). Selenium-core as part of a rails plugin looked nice but did not seem to fit with rspec stories. So I went the Selenium-rc route. Since Selenium uses a separate instance of rails
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All: I have been working with <a href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my Rails app. I am stumped on how to iterate through a collection of items and output them in a table format. The way I have tried it so far only returns the last item in the collection -
2008 Jan 16
1
session data and user stories
hello there, i have been trying my hand at this rbehave material, specifically in terms of integration testing a rails application, and i am curious about the most friendly way to deal with session data. currently, the only way i have found to simulate a session is to open a session and refer to everything afterward via the @session variable stored after open_session. it seems to be workable,