similar to: rspec 1.0.x and liquid?

Displaying 20 results from an estimated 100 matches similar to: "rspec 1.0.x and liquid?"

2007 Apr 20
1
getting controller specs to work on edge
I''m using edge spec, edge rspec_on_rails, edge rails. I just switched to edge and ran the translator tool and I''m trying to get everything to pass again. One of my issues is getting render back up and working for my controller specs, here''s an example: describe "Requesting /users using GET" do controller_name :users setup do @user = mock_model(User)
2007 May 23
2
rspec mocha and controller specs without integrated_views
The ability to choose a mocking framework is great as I prefer mocha, but I am have problems. On my controller specs, I am forced to ''integrate_views'' as the following code below shows you, the mocking of views is rspec specific. See stub! versus mocha''s stub unless block_given? unless integrate_views?
2010 Jun 20
10
RSpec 2 view example: render_template
On http://github.com/rspec/rspec-rails under "View specs" there''s an example describe "events/index.html.erb" do it "renders _event partial for each event" do assign(:events, [stub_model(Event), stub_model(Event)]) render view.should render_template(:partial => "_event", :count => 2) end end Is this indeed correct? From the
2005 Dec 19
1
Preserving fallback with RJS
Hi guys, I really like RJS. I think they''ll replace partials in alot of instances. Unfortunately, because they''re automatically used like .rhtml and .rxml and are hard to specifically specify it makes it messy to preserve fallbacks when using them. For instance, using partials instead of rjs, my create method might look like: def create post = Post.new(params[:post]) ...
2007 Aug 21
1
Render template not matching absolute path
Hi I have a simple controller method like this: class StylesheetsController < ApplicationController layout nil session :off def gap site = Site.find_by_hostname(request.host) @colours = site.colours respond_to do |accepts| accepts.css { render :file => "#{RAILS_ROOT}/app/views/ stylesheets/gap.rcss" } end end end And I want to test that
2006 May 04
1
How do I identify the initiating View from within a Helper?
I would like to call a helper method from my View to construct a sidebar menu. The menu is contextual, so ideally I would like to do something like this: View ---- <%= sidebar_menu %> Helper ------ def sidebar_menu case _calling_view_ when ''_view_identifier_'' ... build menu... end end where ''_calling_view_'' is the key that points to the
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
Lindsay, Wouldn''t you want to use a component for this? I know components seem to be out of favor, but they seem like a perfect fit for this very thing. You could then go like: <%= render_component :controller => ''sidebar'', :action => ''home_menu'' %> The :action parameter could even be more dynamic based on your own needs. Maybe someone
2005 Aug 17
4
Stop an action ?
Hi. I am working on a generic authentification system for rails (more complete than the login generator). The way it works is you call a method inside your action, passing the domain as a parameter (domains are like a group of users with specific rights). For that purpose, I need to exit the action inside this method because it redirects to a login page if that person isn''t
2007 May 09
4
UI testing framework? (w/o selenium)
Hey all, I am currently working on coming up w/ an easy to use, developer-centric web testing framework to test a J2EE app with. (I have 3 rails apps in production, love rspec, and am currently at a java shop). I''ve looked at selenium, and it just doesn''t seem like it is ready for prime time, and the target audience is developers. So, having said that, does the rspec
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi, Its taking me a long time to get my head around the Liquid plugin. I have a couple of questions which hopefully someone can help me with... - How difficult would it be to add some kind of Filter or Tag which would allow other Liquid templates to be included into the current Liquid template (eg. similar to render(:file => "filename") - How difficult would it be to add
2006 May 04
0
liquid positioning of draggabels
Hi, is there a way to keep the positioning of draggables "liquid" after dragging them. See this link for an example: http://www.suss.com/dragtest/index.htm If you just open the page and increase/decrease the size (e.g. STRG+ mouse wheeling) both boxes keep their relative position. But as soon as you drag the red box, it''s position is fixed and only the size of the box changes
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ? -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2008 Apr 20
1
Liquid & Rails 2.0.2
Hello, I am using Rails 2.0.2 and the liquid template engine does not work properly. The template is not interpreted as a liquid template, but like an erb template. template name : view/pages/template_1column.html.liquid def index render :action => ''template_1column'' end The template is loaded by rails, but not interpreted by the liquid template engine. Any ideas ?
2009 Sep 15
0
Liquid assign_to
Hello using liquid markup i am trying to do the following. {{ ''holiday'' | album_thumbs | assign_to ''asset_list'' }} {% for asset in asset_list %} "link: " + {{ asset | asset_path }} {% endfor %} It should return a list with all assets for the loop, but the asset_list variable never gets set. It just returns #### (number of records) on this line:
2007 Apr 17
0
Do liquid templates play well with RJS?
Im looking to use liquid template for security reasons, our coding & designer teams work in semi-isolation. We are looking to use some RJS goodness but I''m not sure if you are faced with the same problem as with Rhtml, ie. you are running ruby code which can do anything it is told to do, eg. delete all files on the hardrive. Can anyone confirm this is the case? -- Posted via
2010 Dec 21
0
liquid include error please help
Hi All, I have been trying to get my following code working for almost 4 days and glad if you could help me. Basically what I want to do is to use liquid ''include'' tag I''m getting this error Liquid error: No such template ''test'' my code is as follows in my app/views/page/index.erb <% file_system =
2003 Feb 21
0
Live a healthy life with VERIUNI nutritionals. Tasty liquid multivitamin (PR#2567)
Live a healthy life with VERIUNI nutritionals. Tasty liquid multivitamin ensures you'll get nearly every daily nutrient required for prolonged health.Powerful antioxidant unleashes the power of red wine extract and polyphenols for the ultimate mind and body energizer. All-natural ingredients. No sugar or artificial preservatives. For more information, check out
2006 Jan 31
2
Liquid templates and forms
I have started to experiment with Liquid templates and all goes fine as long as I just display my stuff. But I want to get user input (using forms), and I couldn''t figure out so far whether and how liquid facilitates the use of forms, something like the form helper tags in .rhtml. Anybody knows about that ? -- Roberto Saccon - http://rsaccon.com -------------- next part --------------
2006 May 16
2
liquid: passing objects
I''ve got Liquid installed and maybe since I''m not coming in with Django experience, I''m completely mystified by how to pass anything worthwhile to a template. In my controller: def preview @customer = Customer.find(1) @letter = Letter.find(1) @liquid_body = Liquid::Template.parse(@letter.body) @x =
2007 Aug 17
4
should_receive, used in the wrong place?
What do you guys think of this: if someone calls should_receive outside of an "it" block, it warns you. before(:each) do @foo = Foo.new @foo.should_receive(:monkeys) end would warn you that you''re setting an expectation in the wrong place, and that "stub" is correct when setting up objects. Opinions? courtenay