similar to: rspecing rjs - form.reset(''form'')

Displaying 20 results from an estimated 200 matches similar to: "rspecing rjs - form.reset(''form'')"

2007 Jun 15
2
Is it still possible to use should_have_rjs
Hi I''ve come back to a Rails project after about a month doing other work, and there''s a lot of changes. I was on the 0.7 branch before and I''ve upgraded to RSpec 1.0.5. I used the spec translator, fixed the cases where it barfed on unusual line contents, and all my model and controller specs now pass. But I''m getting 53 failures on my view specs,
2010 Jan 07
1
text field with autocomplete
Hey everybody, I am using text field with autocomplete in my posts new action. That works great. Response from autocompleter in firebug: POST http://localhost:3001/posts/auto_complete_for_tag_name 200 OK 68ms but if I use the same in edit action it fails and I got this error. POST http://localhost:3001/posts/781/auto_complete_for_tag_name 404 Not Found 81ms *** POSTS controller: *** def
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
2010 Feb 06
1
accepts_nested_attributes_for with has_many => :through
I have two models, links and tags, associated through a 3rd model, link_tags. I added the following to my link model, has_many :tags, :through => :link_tags has_many :link_tags accepts_nested_attributes_for :tags, :allow_destroy => :false, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } and put this in a partial called by the new and edit forms for links,
2009 Dec 11
1
Stubbing calls to S3 from Paperclip
Any idea on how to stub calls to Amazon S3 from the Paperclip plugin? -- Andrei Erdoss -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091211/640e28ad/attachment-0001.html>
2006 Mar 31
4
javascript help
Hi list, I have a list of tags. I want to be able to click on a tag and have that tag name populate an input field. I think delicious used to allow you to click on existing links to tag your bookmark similar to this (moving instead to auto_complete). My guess is the code looks something like this.... <form> <input type="text" name="all" id="discover"
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
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 Dec 20
3
How-to spec this helper method?...
Hey gang, I have this dead-simple method defined in a helper: def add_category_link(name) link_to_function name do |page| page.insert_html :bottom, :categories, :partial => ''category'', :object => Category.new end end Where, and mostly how, would I spec this? I haven''t been able to find how to stub the rjs in a helper spec, so
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
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 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2008 Jan 23
4
expect_render(...).and_return(''x'')
Hi, I''m trying to spec a controller method which renders some rjs as part of a render :update block. The problem I''m having is that stub_render or expect_render don''t seem to allow and_return to work. The controller method does: if @thing.save render :update do |page| page.insert_html :bottom,
2008 Apr 11
4
request.params causing errors
Hello, I have a rhtml file that goes through the request.params. One of my test generates that file, but rspec pops an error saying : undefined method ''params'' for ... I''m not sure what to do with this, since request.params actually works with rails. Any idea? Thank you Olivier Dupuis -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and then used wget to look at the output the RJS template generates. This is what I got: try { new Insertion.Bottom("list", "<li>Fox</li>"); new Effect.Highlight("list",{duration:1}); Element.update("header", "RJS
2008 Jun 03
9
Build rspec-rails as a gem?
I can''t figure out how to build rspec-rails as a gem when just cloned from github... there isn''t any .gemspec file or rake task that does this. Any help? -- Posted via http://www.ruby-forum.com/.
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller named say_when but show is called <td><%= link_to ''Say when'', todo, :action => :say_when , :remote => true %></td> class TodosController < ApplicationController # GET /todos # GET /todos.xml def index @todos = Todo.all respond_to do |format| format.html #
2006 Apr 25
2
JRS problem
Hi all, I''m playing with the new RJS stuff. Very cool! But I have a problem. The following code works ok: page.select(''div.blogcomment'').each do |element| page.visual_effect :highlight, element end All div''s with class blogcomment are highlighted correctly. But I just want the last elemen to be hightlighted. The following code is not working:
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