Displaying 20 results from an estimated 1000 matches similar to: "nokogiri selector help"
2007 Oct 02
6
color output?
does story runner have commandline options ,eg to add color to output?
2007 May 29
4
rspec and autotest (was: questions rspec on rails)
Do have the latest versions?
RSpec-1.0.3
ZenTest-3.6.0
---------- Forwarded message ----------
From: Jonathan Linowes <jonathan at parkerhill.com>
Date: May 29, 2007 11:47 AM
Subject: Re: [rspec-users] questions rspec on rails
To: rspec-users <rspec-users at rubyforge.org>
Hi, I should have mentioned I already did that. Here''s my spec.opts file
--colour
--format
progress
2007 Nov 20
4
cap deploy:spec
fyi, I just posted this
http://www.vaporbase.com/postings/Running_rspec_after_you_deploy
- linoj
2008 Jan 23
6
sharing specs in a subclass
Hi
I''ve spec''d a class and they pass.
Now I''d like to assure that any subclass of this class also passes  
the same specs.
Any suggestions for a clever way to handle this?
I''d prefer to keep the existing specs as is (eg instead of moving  
everything into shared behaviors, or doing something to all the  
''describe'' lines)
thanks
linoj
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
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all
n = Nokogiri::HTML("<h1>H1</h1>")
n.to_s
# => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html>
Is there a method that only outputs the stuff I''ve read, and not the
whole valid XHTML stuff?
2007 Jun 12
8
rdebug spec ?
Can you run rdebug on specs?
I get errors when I try:
$ rdebug spec ./spec/models/select_option_spec.rb
./spec: Is a directory - ./spec (Errno::EISDIR)
         from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ 
rdebug:136:in `debug_load''
         from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ 
rdebug:136
         from /opt/local/bin/rdebug:16:in `load''
2007 May 23
3
log file
hi,
When running rails spec tests is there a log file generated? i''m  
looking for generated sql to help me debug like in development.log
or is there a way to run the test against a webrick server so i can  
see logs?
(i''m not running with spec_server at the moment, it doesnt seem to  
work well with autotest)
thanks
linoj
2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so  
the stub sets it too?
def find_foo
   @foo = Foo.find(params[:id]
end
...
controller.stub!(:find_foo).and_assigns(:foo, "123")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2007 May 22
5
rails edge
hi,
first time trying rspec, and rails edge. Are there any known issues  
running rspec with rails edge?
for one, apparently script/generate scaffold_resource has been  
renamed just "resource". Do I just search/replace "scaffold_resource"  
with "resource" in file rspec_resource_generator.rb ? Somethings  
still missing.
before i get "Couldn''t find
2007 Jun 03
3
should_receive.again
Hi,
It appears that if I have 2 should_receives in a row, the latest one  
overrides the previous one(s).
If there isn''t one, could we add a way to accumulate them, such as
@thing.should_receive(:method).and_return(@value)
@thing.should_receive(:method).again.and_return(@value)
@thing.should_receive(:method).again.and_return(@value)
would be equivalent to
2011 Feb 20
7
Using Nokogiri to insert a <span> tag into existing text
All,
I''m using Nokogiri to handle the following problem:
I have a piece of HTML, and for certain text nodes, I need to insert
<span> tags into the text of these nodes at a certain place.
What I am doing is finding the place where I want to insert the <span>,
let''s say index X of the text node''s text, and doing the following:
1) Setting the node''s
2011 Dec 05
12
Using nokogiri
HI,
I want to grab some information about university names, and I found
this term called "web scraping"
I search about it in google, and there are tools in ruby.
One of them is nokogiri but I''m a bit confused because it seems that
it only gets information that its already in an html or xml
I found a webpage that have a list of university names as a
<select>
2007 Oct 17
4
works in script but not in rake
Hi,
This is weird
All my current spec examples are passing (about 750 of ''em) except a  
set of 6 in a specific controller spec. I get the following failure  
on each 6 when I run it via
    $ rake spec
for example:
---
ActionController::UnknownAction in ''MembershipsController handling  
PUT /project/ID/membership/N/accept should flash message''
No action responded to
2007 May 25
4
rspec on rails update question
I''m sure this is OT but I''d appreciate the help
I''m using rspec_on_rails
I prefer to use stable release rather than live dangerously (at least  
until I can tell the difference between what I might be doing wrong  
vs problems in rspec). However, I would like to try the  
RspecScaffoldGenerator fix.
I installed (per the docs) last week with the following commands
  
2007 Oct 26
2
rspec and capistrano
Hi,
has anyone here written a capistrano task for rspec to run through my  
specs on the deployed server? I''d appreciate a snippet or two to get  
me started.
Thx
linoj
2007 May 30
2
should_eql etc?
Hi, I''m trying the specs for restful_authentication I found here
http://jonathan.tron.name/articles/2007/01/02/rspec-on-rails-restful- 
authentication
It seems to use custom .should methods: should_eql,  
should_be_an_instance_of, should_redirect_to, should_be_success,  
should_not_be_nil, should_be_nil, should_not_be_nil, should_be_empty,  
should_be_success, should_not_change, and 
2007 Sep 25
7
simple story, extract link
hi,
I just started fooling around with story runner, thought I''d start  
with a dead simple scenario:
The first thing I do when describing a site to someone is go to the  
home page, and begin exploring public pages from there.
So, that seems like a good first story to spec out.
And I''d really like to extract the actual link from the rendered page  
(rather than just
2010 Nov 20
4
How to get rspec running?
I''m quite new to RoR and recently worked through Michael Hartl''s Rail
Tutorial. Now that I had started my first own project and began with the
implementation of a first model and it''s controller. The tests I wanted
to implement just after that. However, I run into some error messages
when I want to start rspec (see below).
The Gemfile is the same as in the Tutorial
2007 Oct 20
14
Problems with form_for and partials
i''m having problem with a form_for situation where i''m trying to DRY
out the repeated parts of my forms and put them in common/form and
render the form elements via another partial in controller_name/_form.
Here''s the first form
# app/views/common/form
<% form_for ... do |f| -%>
  <%= render :partial => "params[:controller]/form", :object => f