search for: have_rj

Displaying 8 results from an estimated 8 matches for "have_rj".

Did you mean: have_rjs
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: <http://rubyforge.org/pipermail/rspec-users/attachments/20081210/ca71c792/attachment.html>
2007 Jun 15
2
Is it still possible to use should_have_rjs
...3 failures on my view specs, all along the lines of: should have visual effect Unknown RJS statement type effect /Users/ashleymoran/Documents/Development/YourMoney/trunk/src/spec/ views/admin/add_dealer_rjs_view_spec.rb:33 31 32 it "should have visual effect" do 33 response.should have_rjs(:effect, :blind_down, "add_dealer") 34 end 35 I''m trying to revert these to should_have_rjs but I''ve looked through the RSpec source and it seems should_have_rjs was silently removed between 0.8 and 0.9. At least I can''t find any reference to it in the...
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
2008 Jan 23
4
expect_render(...).and_return(''x'')
...do if I want to solely test the controller in isolation), I get: new Insertion.Bottom("x_thing_list", null); Form.reset("x_new_thing"); The null is due to the render :partial being stubbed. Unfortunately, this breaks the regex that assert_rjs uses, so my test: response.should have_rjs(:insert, :bottom, "x_thing_list") fails, when it should pass. What I need to be able to do is: expect_render(:partial => ''thing'', :object => @thing).and_return(''"x"'') so that the output satisfies the assert_rjs regex. I would love t...
2007 Oct 25
0
How to spec a render:update call
...#39;edit'', :partial => ''form'', :locals => { :operation => ''edit'', :submit_button_value => ''Update'' } end We used to test this with something like: response.should render_template("_form") response.should have_rjs(:replace_html, ''edit'') ... which works, but doesn''t validate the parameters. Then I discovered we could do: controller.expect_render(:partial => ''form'', :locals => { :operation => ''edit'', :submit_button_value => '&...
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
2007 Oct 25
0
specs for RJS
What''s the current best practice for spec''ing (and stubbing) RJS? response.should have_rjs(*args, &block) from rspec_on_rails works well for things that assert_select_rjs supports. But for other things, like say page[:elm].add_class_name :class_name, it''s not clear to me the best way to test for this. I''d love to be able to do something like page[:elm].should_rec...
2008 Mar 05
3
having trouble specing an ajax request
Do I need to spec an AR. If yes, what is the best way to spec this. here is the code - def index @deals = Deal.paginate(:all, :conditions => prepare_search_conditions, :order => ''created_at DESC'', :page => params[:page] ) if request.xhr? render :update do |page| page.replace_html "table", :partial =>