similar to: assert2-0.4.6 provides assert_xhtml, an alternative to assert_select

Displaying 20 results from an estimated 800 matches similar to: "assert2-0.4.6 provides assert_xhtml, an alternative to assert_select"

2009 Mar 12
0
assert_xhtml - test your HTML by example
Rubies: My quest to get the maximum coverage & diagnostics from the leanest possible tests has reached a new level. This is a Rails functional test on an HTML form: user = users(:Moses) get :edit_user, :id => user.id assert_xhtml do form :action => ''/users'' do fieldset do legend ''Personal Information''
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2. Running rspec on it brings about a large amount of these messages: DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:haml] instead. (called from block (2 levels) in <top (required)> at
2007 Jan 28
0
assert_select alternative
Hey guys, I was having issues with some of the way assert_select worked, so I wrote an alternative to assert_select using hpricot. The major differences: * You get full support for CSS3 and limited XPath * It uses hpricot, which is fast; plus you get improvements to hpricot for free in assert_elements as long as you update the gem. * Blocks work a bit differently (assert_elements tests whether
2010 Feb 02
0
[Security] Loofah has an HTML injection / XSS vulnerability, please upgrade to 0.4.6
Synopsis ---------- Loofah::HTML::Document#text emits unencoded HTML entities prior to 0.4.6. This was originally by design, since the output of #text is intended to be used in a non-HTML context (such as generation of human-readable text documents). However, Loofah::XssFoliate''s default behavior and Loofah::Helpers#strip_tags both use #text to strip tags out of the output, meaning that
2008 Apr 18
1
[LLVMdev] Disabling Verifier
Hi, I've noticed that the funcionality in the Verifier.cpp significantely slows down the compilation, especially for big basic blocks. In this case the llvm::DominatorTree::dominates() seems to consume a lot of time. Some debugging has shown that it is the Assert2() macro usage in the Verifier::visitInstruction(), arount this place: // Definition must dominate use unless use is
2011 Nov 18
1
What does :count actually mean in assert_select?
Hi guys, I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I could not find anything. I''m using Rspec2. Example: spec/factories/categories.rb ====================== FactoryGirl.define do factory :category_intakes, :class => ''category'' do name ''intakes and filters'' description ''airfilters and
2007 Mar 23
2
assert_select VS assert_no_tag
Hi everybody. Assert_no_tag will be deprecated soon. How can i use assert_select for checking not existed tag? Thanks. Bye. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2007 Jan 23
1
assert_select issue
I''d like to do an assert_select where only ONE of the matching elements needs to match the :text. It seems counterintuitive to me to require them *all* to match, which precludes me from testing the existence of a particular tag (h1) with some particular text if other instances of the same tag exist. I know that I can narrow down the field by using more detailed selectors, but it sure
2007 Jan 26
0
Problems with assert_select in integration tests
I''ve been battling with assert_select in my integration tests for several evenings now. I''m testing a multi-step form, and after submitting the first step, my assert_selects fail on the attempts to find the form on the next page. However if I print out the response object, it has the exact text of what I''m trying to match. Here is the complete integration test. The
2008 Feb 18
0
is assert_select indicated for XML?
Railsers: I''m playing with the Beast, and this test fails: def test_should_show_topic_as_rss get :show, :forum_id => forums(:rails).id, :id => topics(:pdi).id, :format => ''rss'' assert_response :success assert_select ''channel'' end It emits "ignoring attempt to close channel with link". So why are
2007 Apr 26
2
assert_select with respond_to JS or xhr?
Hi everyone, I am a bit confused with xhr? and respond_to. I have the folloing code in my view to update the ''emails'' ID link_to_remote(image_tag("refresh"), :update => "emails", :url => { :action => "list_emails" }) in the controller side i have somthing like : [..] respond_to do |type| type.html { render :action
2007 Mar 19
3
Assert_select
Hi all This is my first post here. I ave been using Rails for a couple of months, and am starting to put together a test suite. But I''m having a problem with assert_select in my functional tests. According to the documentation, it should be fine with two arguments - a CSS selector and a string to test it against. But no matter what I do I keep getting the exception: wrong number of
2008 Dec 13
3
Bug with assert_select and javascript?
Hi, I am using Rails 2.2.2 and have some javascript in my html.erb file in the body of the document, inside script tags. The script (which works as intended) contains the line for(var i=0; i<boxes.length; i++) In my functional tests I use assert_select and it is generating a warning "ignoring attempt to close boxes with script". It appears to be interpreting the text
2007 Feb 07
0
assert_select '[foo|=bar]' bug?
just for the record, i tried searching the archives on this one but would get an application error when i tried entering |= in the search field. assert_select ''[foo|=bar]'' behaviour does not seem to jive with the css specs: http://www.w3.org/TR/CSS21/selector.html#q1 http://www.w3.org/TR/css3-selectors/#selectors is there some reason i don''t know about for this or is
2007 Jul 06
0
Test XML Documents Using assert_select
Have you ever wanted to test your API output without those pesky assert_select error messages? Well now you can! http://dev.rubyonrails.org/ticket/8173 The patch has been sitting there quietly with no comment for a couple months now. I think it should be pretty easy to apply. It won''t affect standard HTML output or even XHTML given IE''s inability understand the standard
2010 Aug 27
6
assert_select for <p><b>text</b>value</p>
I have the following html <p><b>text</b>value</p> I can use assert_select "p>b", "text" to check the text portion, and assert_select "p", "value" to check that the value appears in a <p>. I cannot work out how to check that the two are in the same <p>. I have used assert_select for much more complex tasks but my mind
2007 Jun 27
1
rspec_on_rails: assert_select wrapper doesn''t play nice with XML
Hey, I''m using rspec and rspec_on_rails to test some RSS feed views, the problem is that the specs spew out messy warnings when they run: ignoring attempt to close channel with link opened at byte 61, line 3 closed at byte 141, line 5 attributes at open: {} text around open: "ss version=\"2.0\">\n <channel>\n <title" text around close:
2007 Jun 22
5
assert_select trying to verify the presence of a textarea
Hello, One of my functional tests looks like this: def test_presence_of_free_text profile = Profile.find :first post :edit, {:id => profile.id} assert_select "textarea", :name => "record[free_text_ec]" end The test results in a failure, because the element cannot be found. I''m pretty sure the element should be there, and I''ve tried
2009 May 23
9
undefined method `assert_select'
I''m having trouble getting the specs to run for a plugin where I want to fix a bug. (I''ve actually already found and fixed the bug, but I don''t want to submit a fix without a test!) When I started the specs weren''t running, but it may be that I''m using Rails 2.3.3 and the plugin has been tested on 2.1 and earlier. I went through writing a spec for a
2010 Jun 10
0
strange problem:no such file to load -- nokogiri on rails3
I am test the script named test.rb by command "ruby test.rb" and it pass. Then i converte it as rake task. The rake task pass on rails 2.3.4 but fail on rails 3 beta4 with error msg: "no such file to load -- nokogiri" ============================ env :rails 3 beta4, ruby 1.8.7, ubuntu ============================ test.rb ============================ require