search for: rhtml_spec

Displaying 12 results from an estimated 12 matches for "rhtml_spec".

2007 Aug 08
3
rspec with autotest on a windows machine
...39;'m having the following error running autotest w/rSpec: D:\ruby\projects\forecaster>autotest loading autotest/rails_rspec c:\ruby\bin\ruby -rrubygems -e "require ''redgreen''" -S script/spec -O spec/spec.opts spec/models/weather_spec.rb spec/views/weathers/show.rhtml_spec.rb spec/controllers/weathers_controller_spec.rb spec/views/weathers/new.rhtml_spec.rb spec/views/weathers/edit.rhtml_spec.rb spec/helpers/weathers_helper_spec.rb spec/views/weathers/index.rhtml_spec.rb invalid option: -O Test::Unit automatic runner. I also have the TDD screencast and I am able to...
2007 Nov 01
5
Can''t delete app/helpers
I would like to remove some unused helpers from the app/helpers dir, but when I do so my specs fail. Why is this? I don''t see where those helpers are referenced within the tests. Is there a way to delete these unused files? Thanks -- Posted via http://www.ruby-forum.com/.
2007 Oct 05
13
spec''ing view render partial collection, local variable not found
...or 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?'' ./spec/views/games/_game.rhtml_spec.rb:39: def before game = mock_model(Game, :name => ''The Battle for Blaze'', :salt_grains => 5000000, :people => 5000000, :days => nil, :created_at => "Mon Oct 01 00:02:44 -0400 2007", :enabled => true) game....
2007 Oct 10
2
RSpec seems to be having a hard time loading Helper classes
...vendor/plugins/rspec/lib" "/Users/chrisolsen/Projects/Rails/chrisolsen/trunk/vendor/plugins/rspec/bin/spec" "spec/controllers/projects_controller_spec.rb" "spec/helpers/projects_helper_spec.rb" "spec/models/project_spec.rb" "spec/views/projects/edit.rhtml_spec.rb" "spec/views/projects/index.rhtml_spec.rb" "spec/views/projects/new.rhtml_spec.rb" "spec/views/projects/show.rhtml_spec.rb" --options "/Users/chrisolsen/Projects/Rails/chrisolsen/trunk/config/../spec/spec.opts" failed ++++++++++ The projects_helper_...
2007 Nov 20
5
Autotest rspec issues
...kes it crap out with an initialize error, complaining about wrong arguments (0 for 1) or somesuch - the exact stack trace and error I can post when home again tonight. 3. I can live with the first two, but autotest isn''t picking up any changes to any view specs. I''ve tried index.rhtml_spec.rb and index.html.erb_spec.rb but nothing does the trick. Controller spec changes are detected just fine. Haven''t tried model specs yet. I''d love to hear any suggestions you may have and thank you kindly in advance. Brad -- Posted via http://www.ruby-forum.com/.
2007 Dec 09
2
What to test for views?
When you guys test views, what are you testing? Do you just test that all the form fields exist in a new.rhtml, that all form fields are filled in an edit.rhtml, and that all the proper columns are are shown in a index.rhtml page, or is there something more that should be tested? Thanks. -- Posted via http://www.ruby-forum.com/.
2007 May 30
18
autotest and rspec_on_rails not happy
Hi, I''ve been using the rspec and rspec_on_rails plugins quite happily on my Rails project for a while now. Today I noticed the autotest support in RSpec-1.0.3 and decided to give that a spin. Oh tragedy! $ autotest loading autotest/rails_rspec ./vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb:33:in `initialize'': undefined method `singularize''
2007 Aug 11
2
Rspec and acl_system2 plugin
...thentication/acl_system2 plugins. In my admin layout, I put the following code : <% restrict_to "admin" do -%> <ul id="admin-tabs"> <li> /users Users management </li> </ul> <% end -%> Then in my spec file ''spec/views/layout/admin.rhtml_spec.rb'' : describe "Layout Admin if admin user" do include UserMockViewHelper it "should display the admin tabs" do login_as :admin render ''layouts/admin'' response.should have_tag("ul#admin-tabs") end end the UserMockViewHe...
2007 Sep 30
9
Problems with testing nested routes using mocking
Hello forum I have there to files #----- virtual_host_controller.rb class VirtualHostsController < ApplicationController before_filter :capture_domain # GET /domain/1/virtual_hosts/1 def show @virtual_host = @domain.virtual_hosts.find(params[:id]) respond_to do |format| format.html # show.rhtml end end private def capture_domain if
2007 Oct 01
15
how to spec views
I''m trying to spec a view but haven''t done much view specing. This view render different partials depending on authentication of the user: annon, admin, player So I I''ll write if conditionals in the view with the partials it "should render signup propaganda for annon users trying to view games" do render "/games/index.rhtml"
2008 May 20
4
mock_model not stubbing model attribtues in view spec
...bbing the mocked model''s attributes. For instance, I have the following: <CODE> before do @input_timesheet = mock_model( InputTimesheet ) assigns[:input_timesheet] = @input_timesheet end it "should display a table element" do render ''/input_timesheets/edit.rhtml_spec.rb'' response.should have_tag( ''table'' ) end </CODE> Obviously, the view calls for a number of attributes from the @input_timesheet, but unless I explicitly define these in the mock_model method, I get the following kind of error: ActionView::TemplateError in ...
2007 Nov 07
10
Plain Text Story example
Hey all, Does anyone have an example(s) of the plain text story runner for rails? I have read David''s blog (http://blog.davidchelimsky.net/articles/2007/10/22/plain-text-stories-on-rails) about it but I would like to see some examples with all of the step matchers included... I couldn''t find any more examples on google talking about the plain text stories and the example