Displaying 15 results from an estimated 15 matches for "calicowebdev".
2007 Jun 24
6
mocking errors
What is the correct way to mock out the errors on a Rails model?
I''m assuming i need to say
@mock_thing = mock_model(Thing)
@mock_thing_errors = mock("errors")
@mock_thing_errors.should_receive(:full_messages).and_return("An error")
@mock_thing.should_receive(:errors).and_return(@mock_thing_errors)
Just wanted to check the best practice on this kind of thing and how
2007 Apr 18
1
Scaffolding Specs
I just wrote a really simple tool that cranks out spec scaffolds for
Rails apps. It''s new and pretty simple, but you might find it useful:
http://calicowebdev.com/blog/show/13
--steve
2005 Dec 18
2
Rake Test Output Prettifier
...9;'s my first stab at an HTMLifier for test output. Just download,
unzip, chmod +x, and you can:
rake | ./prake.rb
Which, if you are on a Mac, should bring up a Safari window with a
summary of the problems at the top linked to the details below.
Download from my humble website:
http://www.calicowebdev.com
Comments appreciated.
Steve
--
Posted via http://www.ruby-forum.com/.
2007 May 11
12
tutorial
Hello, Hello
Where i can found a good tutorial about Rspec ?
thanks
2007 Nov 06
3
Keeping Up with Trunk
I have a project with rspec installed as a plugin using
svn:externals. Here are my externals:
rspec_on_rails svn://rubyforge.org/var/svn/rspec/trunk/
rspec_on_rails
rspec svn://rubyforge.org/var/svn/rspec/trunk/
rspec
I just did an svn up on both and now have a version mismatch:
########################################################################
2007 Sep 16
12
rspec_todo -- spec''ing backwards
...specs for each public method.
While it is more sensible to spec behavior of code function than of
individual methods, this tool can help jump start a transition to
that wonderful place. Comments welcome (and please be kind about the
code -- I know it needs refactoring :).
svn:
http://svn.calicowebdev.com/rspec_todo/trunk
Excerpt from the readme:
Usage is:
ruby spec_todo.rb <options> <files>
Options are:
-m -- Wrap each file''s spec in a module
-u -- Use "it" with a block and a pending method rather than a "it"
So, for example, I might use...
2007 May 30
2
Bug? Filter chain halted as [#<ActionController::Filters::..
OK so I''ve been trying to follow the tutorial here:
http://rails.homelinux.org/
When I simply do "scaffold: category" in the controller.rb, everything
works fine. BUT after I generate the controllers and other files using
scaffold AS A SCRIPT (script/generate scaffold categories), DESTROY (or
DELETE) does not work for any record in a table. This is the error I
got:
Processing
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all,
I feel like I''m missing something really easy and I''m just not seeing
it.
I''m using the restful_authentication plugin and have a User model. Uesr
has_many :things and Thing belongs_to :user.
That''s it.
I did a "script/generate rspec_scaffold thing" to generate all the
necessary bits. The "rake db:migrate" to create the db.
At
2007 May 30
6
authentication mocks
hi
I''m using restful_authentication
and have controller specs working using users fixtures (and login_as)
however i''ve been trying for hours without success to do it without
fixtures, using mocks and stubs instead.
anyone here done this? got code?
:)
thanks
2007 May 30
4
Using mocks
I''ve just started doing TDD/BDD and like the idea of mocks. So I set
out to use them. The doc pages seem great, I setup the mock and then
it just works. Here is what I am trying to do:
Myuser is a non-rails model of user attributes. We are going to be
mocking the connection to the ldap server. The user class has a login
method that connects to the ldap server and if successful,
2007 May 15
4
Way to mark record as main?
I was curious if there was a built in feature in ActiveRecord or a
plugin, but I basically have a database for phone numbers. I want a user
to be able to make a phone number as main. There can only be one phone
number marked as main at all times. Is there something for this?
Thanks for your help.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
2006 Dec 26
15
is there a way to not repeat installing plugins?
i seem to be using the same plugins for all my sites and was wondering
if there is a way to make the process easier and faster?
is this what is called by "packing your own gems"?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2007 Jul 04
18
PHP vs RubyOnRails newbie concerns/questions
Hi all,
I''m planning to bring a new app. to market, and I''m more the designer
and business manager than the programmer for this project. We are
deciding that technologies to use, and so I asked my programmer to
take a look at RubyOnRails. Below are his first impressions. Could
anyone with more experience on these matters kindly offer any response
to the issues he raises?
much
2007 Oct 02
3
Note on Rails 2.0 Preview
Make sure you get a relatively current version of rspec or you will get:
/Users/me/rails/ubb/vendor/rails/activerecord/lib/../../activesupport/
lib/active_support/dependencies.rb:263:in `load_missing_constant'':
uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper
(NameError)
Hope this helps someone.
2006 Jan 16
1
Bundled resource -- something I''m missing
I have a decoupled form embedded in my pages ? a search box that has date
fields ? and of course the search fields are not in my model. However,
picking dates is a great use for the Dynarch calendar. It seems that by
using the syntax:
<%= render :partial => ?filter_box? %>
In my view and...
<%= dynarch_date_select ''filter_box'', ''begin_date'' %>