similar to: ror app with advanced rspec?

Displaying 20 results from an estimated 500 matches similar to: "ror app with advanced rspec?"

2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people! Still rspec nuby: I must do something wrong obviously. How can I spec about redirect_to at ApplicationController describe ApplicationController do it "method login_required should redirect to home path without login" do pending "I tried to use controller.login_required.should be_redirected and got NoMethodError with nil object
2007 Aug 28
3
How do you keep mocks updated without pain?
Hi! I know you must be answering a lot of basic questions, sorry about that :-) However I have not get it, how do you keep mocks updated without pain? I reached to the point where mocking things for view. I spec model-controller-view using "correct doc" way mocking-stubbing (plus I should run integration test to be sure that everything really works together). Now, when I want to
2007 Sep 09
11
Going beyond the default html formatter/report?
Hi! I wonder does anybody planning to go beyond the default html formatter/report? The current html report is nice and green but what about to go a little silly and enable also user input. For example to let customer to add a new pending spec, comments etc. I feel it might be mentally easier for some customers to jump into spec world when it is possible to give input at "the same
2007 Oct 13
1
specing system
Hi! Having some wine on Saturday and just playing around writing some ruby script: * have you spec any ''system'' method? As long I know it just returns false or true and everything else is just out of reach; prove me I''m wrong :-) it ''should have response with 64.233.167.99'' system ''ping google.com'' Priit
2008 Sep 29
3
rspec-ui overlap with cucumber?
Hi! I''m using cucumber + selenium and I love it. However I''m looking to add some methods (example: click_and_wait etc) to the lib. Therefore looked around a bit and I got two questions: Firstly about rspec-ui, I''m a little confused, does rspec-ui overlap with its propose with webrat with cucumber or I''m missing a point? Secondly, are there any plans to
2006 Nov 04
4
how to get observe_field to use GET method?
Hi All. I am trying to set-up observe_field so that it uses the GET method (To work with a RESTful controller). <%= link_to_remote("Test", :update => "main", :url => { :controller => "projects", :action => "show", :id => "3"}, :method => "get" ) %> <%= observe_field("project_selector", :update
2007 Aug 14
2
Spec''ing ApplicationController
Folks, I''d like to spec the behaviors that I''m adding to ApplicationController. Specifically, I''m adding: def authenticated? session[:username] != nil end I described ApplicationController, but couldn''t figure out how to call the authenticated method. I''m probably going about this quite wrongly and would appreciate any hints? Thanks, Scott --
2007 Aug 26
4
howto regressions on environment.rb in Rails projects
How would one write a spec on environment.rb in a rails app? I was requiring a gem in environment.rb, but received a "MissingSourceError". Generally, ruby raises a LoadError when it can''t find a gem, but rails overrides this to raise a MissingSourceError (since rails is expecting a required file to be in lib/...). How would I write a spec to override this behavior,
2007 Apr 06
3
@ vs self in models?
i''ve seen both of these syntaxes before and have also used both in my own models: class Foo def get_bar @bar end end and class Foo def get_bar self.bar end end seemingly with no difference... i''m a nuby though so could anyone enlighten me to the differences if there are any? thanks, jeff --~--~---------~--~----~------------~-------~--~----~ You received
2006 May 24
1
send email from form input
OK, I am a Rails nuby, so please keep that in mind. I want to have a form on a page where users can enter in their email address in one field, a message in a text area field, and when they click "submit" the message should be sent to a static email address, say me@mysite.com. I have read the "HowToSendEmailsWithActionMailer", but I am not sure this is exactly what I need.
2006 Jan 10
2
the dreaded error Before updating scaffolding from new DB s
Hi I am pretty sure that this is a common nuby problem but I cannot figure it out i try to run scfaoldong and get a error "Before updating scaffolding from new DB schema, try creating a table for your model" I have mysql set up and created the tables etc. Derek -- Posted via http://www.ruby-forum.com/.
2006 May 03
2
Conditional statement style
This is a bit of a nuby question methinks but i''ve had a play/search around and it''s just bugging me now :0) Say I have a conditional statement, testing a variable against a number of values. The first way i did this is like so: if myvar != "" and myvar != 0 and myvar != nil # .. code end This seems a bit messy - is there neater way of doing this? I thought of:
2007 Dec 12
3
Problem running examples with spec_server
Hello, Running RSpec without DRB works fine. However, "spec -X" runs without error but provides no output at all, even though the DRB spec_server seems to be fine. Has anyone got some suggestions as to why and how to fix? RSpec: 1-1-0RC1 build time 20071212145122 RSpec on Rails: Build time 20071212145122 Ruby: 1.8.6 Rails: 2-0-1 Win XP SP 2 Thanks very much, Dave -------------- next
2006 Mar 01
2
error: uninitialized constant
total rails nuby here. I have a table "thumbnails", hence the model Thumbnail. I''m extending the Thumbnail class with a few constants needed for thumbnail cropping: class Thumbnail < ActiveRecord::Base SOURCE_FILE_PATH = "path/to/source" TARGET_FILE_PATH = "path/to/target" TARGET_WIDTH = 100 TARGET_HEIGHT = 100 end Now, in my controller
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did
2005 Oct 11
4
Searching an attribute in a hmabtm relationship
(Nuby to Ruby and Rails...) I''ve implemented security using the login generator in a simple app so that I have a user table, a roles table, and a join between them (roles_users). All works as expected. I now need to check if a user has a specific role, but my approach is off somehow. Here''s what I''ve tried thusfar: user_roles = @session[:user].roles
2006 Mar 27
1
Best way about doing this?
Hi All, I''m super a super ruby nuby, so bare with me. I am working on a small app that has a particular form that I am having a rough time figuring out the best to way to handle. Basically here it is, each school has one or more classrooms, and each classroom can have one or more teachers. Here''s what I am trying to do (edit a school): - click on a link to edit a School -
2006 Jul 13
2
Intel Mac, Rails, MYSQL - access denied
Hi, Nuby on Rails here trying to bring up an existing app on a new installation. The whole ruby/rails/mysql/lighty installation was done per the much touted "hivelogic article" that runs through all the steps. I am running into a permission error when I try to do a rake migrate to set up a session database needed by this existing app. Extracted from the trace... ** Execute
2006 Mar 28
8
Large Database with lots of tables
Hello all, I am a rails nuby and I am evaluating using Rails for a new web application. The application will have a large number of tables (>70) that will basically mimic a large collection of paper forms that user would otherwise have to fill out. From what I have read on rails thus far it seems I would have to create a lot of models and form templates. Is this common and if so does
2007 Oct 24
13
Ryan Bates' Multi-object Forms and the date_select
I think I''ve found a bug with Edge. I''m trying out Ryan Bates'' multi-object form technique shown in one of his Rails-casts (railscasts.com/episodes/75). If you use a fields_for similar to that shown (here: http://pastie.caboo.se/110480), you get a Server Error 500: ------ Status: 500 Internal Server Error Conflicting types for parameter containers. Expected an