Displaying 20 results from an estimated 30000 matches similar to: "rake spec default environment"
2007 Nov 20
4
cap deploy:spec
fyi, I just posted this
http://www.vaporbase.com/postings/Running_rspec_after_you_deploy
- linoj
2007 Oct 26
2
rspec and capistrano
Hi,
has anyone here written a capistrano task for rspec to run through my
specs on the deployed server? I''d appreciate a snippet or two to get
me started.
Thx
linoj
2007 Oct 17
4
works in script but not in rake
Hi,
This is weird
All my current spec examples are passing (about 750 of ''em) except a
set of 6 in a specific controller spec. I get the following failure
on each 6 when I run it via
$ rake spec
for example:
---
ActionController::UnknownAction in ''MembershipsController handling
PUT /project/ID/membership/N/accept should flash message''
No action responded to
2007 Jul 31
11
helper spec not finding rails core helpers
Hi,
My helper specs were going ok until I added a call to a rails
DateHelper method in one of my helpers
http://api.rubyonrails.com/classes/ActionView/Helpers/
DateHelper.html#M000574
The helper runs fine from my view templates, just dies in the spec test.
I boiled my question down to a simple (not too useful) example. I''m
not sure what I''m missing.
#
2007 May 29
12
questions rspec on rails
Hi, rather than flooding this list with separate emails, I''ve been
queueing up questions using rspec with rails. (an irc channel would
be nice too :) Here ya go...
- Is there a way to test named routes?
- Could I get an example how to test an ajax request
(link_to_remote)? would that go in view? and/or in controller spec?
- Can you assert which layout template is rendered in a
2008 Nov 06
8
anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)
anyone able to explain logic behind "rake spec" startup? i.e. the
below steps & why things occur when they do
Macintosh-2:myequity greg$ rake spec --trace
(in /Users/greg/source/myequity)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute
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 25
4
rspec on rails update question
I''m sure this is OT but I''d appreciate the help
I''m using rspec_on_rails
I prefer to use stable release rather than live dangerously (at least
until I can tell the difference between what I might be doing wrong
vs problems in rspec). However, I would like to try the
RspecScaffoldGenerator fix.
I installed (per the docs) last week with the following commands
2007 May 23
3
log file
hi,
When running rails spec tests is there a log file generated? i''m
looking for generated sql to help me debug like in development.log
or is there a way to run the test against a webrick server so i can
see logs?
(i''m not running with spec_server at the moment, it doesnt seem to
work well with autotest)
thanks
linoj
2007 Nov 18
9
Not sure why this is failing
I am not sure why the tests don''t see the call of the new method for the
Address class. It can be seen in the controller method where the
Address.new is called.
>> @address = Address.new(params[:address])
What am I doing wrong?
Thanks for the help.
Here is the error message:
Spec::Mocks::MockExpectationError in ''UsersController handling POST
/users should create a new
2007 May 30
2
should_eql etc?
Hi, I''m trying the specs for restful_authentication I found here
http://jonathan.tron.name/articles/2007/01/02/rspec-on-rails-restful-
authentication
It seems to use custom .should methods: should_eql,
should_be_an_instance_of, should_redirect_to, should_be_success,
should_not_be_nil, should_be_nil, should_not_be_nil, should_be_empty,
should_be_success, should_not_change, and
2007 Oct 02
6
color output?
does story runner have commandline options ,eg to add color to output?
2008 Mar 11
1
view spec on rails questions
Hi
I have a couple of questions
1)
how do you test the response inside a content_for block
I see reference to it in the release notes but dont know where to
find it (tried http://rspec.info/rdoc-rails/ )
2)
I dont seem to be able to stub partials in a different directory eg
<%= render :partial => "foos/show" %>
And I put this in the spec
template.stub_render(:partial =>
2008 Jan 23
6
sharing specs in a subclass
Hi
I''ve spec''d a class and they pass.
Now I''d like to assure that any subclass of this class also passes
the same specs.
Any suggestions for a clever way to handle this?
I''d prefer to keep the existing specs as is (eg instead of moving
everything into shared behaviors, or doing something to all the
''describe'' lines)
thanks
linoj
2008 May 22
14
Specifying certain tables NOT to be cleared each example?
Is it possible to specify that certain tables not be cleared on each
example.
I''ve inherited a project where a good amount of enumerated data is
stored in the database (US States, statuses, about 15-20 tables worth.
Over all, it''s a reasonable decision that leads to solid production
code (acts_as_enumerated is good). This data is read-only and
relatively static; any
2007 Dec 26
2
How to set environment when calling rake task inside another
This is what I have inside a rake task. In this rake task I need to call
another rake task called email:send_messages. However I need to pass the
RAILS_ENV as ''staging''.
Rake::Task["rake:email:send_messages"].invoke
I tried a lot of variations but none of them work.
Rake::Task["rake:email:send_messages"].invoke RAILS_ENV=staging
2007 Dec 21
4
StoryRunner docs/guidance
Hi all,
Are there any plans for better documentation for the new StoryRunner
feature? I tried to use it today (with Rails), and had a hard time
getting my head around whether I was doing it "right" and exactly what
things are appropriate to test at that level (this might be exacerbated
by the fact that I''ve never really used integration testing that much).
A full example of
2007 Oct 12
6
locals in partials
hiya, in specing a partial, how can i assign a local var that is
normally passed via :locals ? i tried adding :locals => to the render
call but that doesnt seem to take
linoj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071012/fd0acd92/attachment.html
2007 Oct 18
6
spec:models depends on development db:migration
For those interested ....
rake spec:models seems to clone the test database from development. If
your dev db is empty, the models task fails mysteriously.
Anyway, to make sure your dev db is at the current migration version, I
added this dependency in lib/tasks
task ''spec:models'' => ''db:migrate''
Now the dev db is migrated up with each test pass.
Keith
2007 Dec 16
3
how do I spec my Rails routes?
Once again, here''s something I haven''t figured out. Apologies if this
is too newb-ish, but, how do I spec my routes using RSpec-Rails?
In particular, I''ve got a catch-all route that needs to catch a wide
variety of URLs:
map.document ''*url'', :controller => ''documents'', :action => ''show''
Is there a way to