Displaying 20 results from an estimated 10000 matches similar to: "AutoTest / Rspec - "stack level too deep""
2007 Sep 25
4
Autotest with RSpec Rails and Engines
Hi
We have a Rails project using an engine which I want to run autotest
with rspec against.
So the project specific specs are in the specs directory but the
common specs are in the specs directory of the engine plugin (e.g.
vendor/plugin/engine/specs)
Just wondering where I would be looking to change configuration so
that autotest will also look for the specs in the engine directory?
2007 Dec 17
2
RSpec 1.1.0 (Rails) --- Supported Rails Versions?
Hi
Just a quick question .... what backward versions of Rails will the
1.1.0 versions of RSpec and Spec::Rails support?
I think I maybe under the (incorrect) impression that I had to go to
Rails 2.0 for 1.1.0
Cheers
Shane
Shane Mingins
ELC Technologies (TM)
1921 State Street
Santa Barbara, CA 93101
Phone: +64 4 568 6684
Mobile: +64 21 435 586
Email: smingins at elctech.com
AIM:
2007 Oct 05
4
have_xml_tag
Hi
Was just using have_tag on an xml response and found the problem
outlined and resolved here
http://weblog.jamisbuck.org/2007/1/4/assert_xml_select
Just wondered if there is any support in rspec?
Cheers
Shane
Shane Mingins
ELC Technologies (TM)
PO Box 247
Santa Barbara, CA 93102
Phone: +64 4 568 6684
Mobile: +64 21 435 586
Email: smingins at elctech.com
AIM: ShaneMingins
Skype:
2007 Aug 01
3
Test Rendering nothing in Rails
Hi
In a controller I have method that is accessed via an AJAX call and
will conditionally do:
render :nothing => true
to test the condition hitting this line I was hoping to do something
like:
response.should render_template(:nothing)
How should I test this behaviour?
Cheers
Shane
2008 Mar 14
2
Lib Specs and config.use_transactional_fixtures = true
Hi
We have specs in our rails project other than model/view/controller ..
we have interests and lib ...
using use_transactional_fixtures = true seems fine in a spec in the m/
v/c and interests directories but not in lib
Just wondered if anyone had any quick thoughts as to why that may be???
Shane Mingins
ELC Technologies (TM)
1921 State Street
Santa Barbara, CA 93101
Phone: +64 4 568
2007 Nov 21
2
When you sometimes wonder how to test this??
Hi
Just something that I have been finding very helpful sometimes when I
am stuck with "how could I test this?" moments is looking at the
Rails test suite.
At the moment I am working on testing our custom error_messages_for
methods and I have found looking at how the Rails tests in
active_record_helper work helpful :-)
So just thought I''d share that. Have
2008 Mar 10
10
tutes on testing controllers
hello spec''ers,
i''m in the hunt for guides on testing controllers with rspec, would
you guys recommend any?
thanks
Oliver
--
Oliver Azevedo Barnes
oli.azevedo.barnes at gmail.com
+55 11 9768 0193
http://www.linkedin.com/in/oliverbarnes
http://workingwithrails.com/person/4704-oliver-barnes
2007 Sep 04
7
1.05 to 1.08
Hi
We are looking at moving a project over from 1.05 to 1.08 but have a
problem with some of our helper specs
They work fine in 1.05 but error in 1.08 and it is the calls to route
helper methods that seems to be the problem.
I did some playing around .. because the code being tested is
reasonably large etc ... but this sample (using the peepcode app)
seems to boil down the problem
2007 Oct 25
3
Mocking Workers in Backgroundrb
Hi
Has anyone mocked a call like the following for backgroundrb?
MiddleMan.new_worker(:class => :admin_email_worker, :args => params
[:email])
I cannot seem to find the correct manner to do it.
Would have liked to be able to do MiddleMan.should_receive
(:new_worker).with(:class => :admin_email_worker, :args => {"body" =>
"my message"})
Cheers
Shane
2008 Jan 30
9
catching errors, rspec basics
Trying to spec the following but don''t know if I''m using the right matcher.
How do I spec? Plz, sugar on tops.
Audience.stats
- should have a stats of 80 when passed a flux of 10
- should return an error when passed a string (ERROR - 1)
1)
TypeError in ''Audience.stats should return an error when passed a string''
String can''t be coerced into Fixnum
2007 Nov 30
4
Rendering a view and passing a variable
Hello all,
I have a view which display html based on the value of a variable. Here''s the code :
<% if @language == ''e'' %>
<%= link_to "Français", :action => :index, :id => "f" %>
<% end %>
In my test, I''m trying to set the value of the variable first, but that just doesn''t seem to work :
it
2007 Jun 11
2
Testing create in Rails controller
Hi All
So I am a first-time caller ;-) ... and have been trying to apply
RSpec to the depot example in Dave Thomas'' book as I build the
application.
I am having a problem testing the admin controller create method and
cannot quite see where I am going wrong so was hoping for a pointer :-)
My spec looks like:
describe AdminController do
before(:each) do
@product =
2007 Oct 04
3
Is stubbing a call to super possible?
Hi
Is stubbing a call to super possible? I am testing a protected
method called authorized in a Rails controller ... part of the logic
flow calls super which calls the method authorized in the application
controller.
As I am focused on the logic of the method in the controller I am
testing I just wish to stub the value returned in the super.
Is this at all possible?
Cheers
Shane
2007 Oct 17
15
Any tips on teaching BDD with RSpec?
Hi
I hope this is not OT. I''m training my replacement at work to do BDD
Rails development. He''s done a CS/maths degree but has no
professional programming experience, so he''s never NOT done a project
without BDD. In a way I am jealous of his unspoilt situation :)
I''ve gone about things this way:
* first teach him some Ruby (he did mainly Java at
2010 Apr 15
11
Rails 3, Rspec 2, Autotest
Trying to set up a Rails 3 project with RSpec and Autotest. I followed
these steps exactly:
http://gist.github.com/365816
But when I start up autotest, I get:
$ autotest
loading autotest/rails
style: Rails
instead of:
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
And autotest doesn''t seem to do anything. Any idea what''s happening?
I''m using Ruby
2011 Jan 14
2
Rspec autotest error
Hi all,
I tried testing with Rspec for first time, following a tutorial.
"rspec spec/" works fine but when I try ''autotest'' it gives me the
error message below. I also made a gist about it: https://gist.github.com/779265
It seems like a redgreen or ZenTest error. I''m using Ubuntu10, Rails3,
Ruby 1.9 and RVM. Any help is appriciated, thanks in advance,
gezope
2007 Aug 06
5
using RSpec''s trunk in non-rails projects w/ Autotest
I believe for rails projects you can put rspec''s code repos into
vendor/plugins, and autotest will automatically use the rspec binary
in that directory, and not the gem installed.
Is there an easy way to do this for non-rails projects? There are a
few advancements on trunk which I would like to take advantage of.
Tips welcome ; ).
Scott Taylor
2007 Oct 31
6
Autotest busted with Rspec/Rails trunk
Just upgraded to latest rails and rspec builds and my autotest doesnt
work
undefined method `before'' for Spec::Rails::DSL::RailsExample:Class
(NoMethodError)
Here''s the full trace:
http://pastie.caboo.se/112754
Any ideas?
--
Posted via http://www.ruby-forum.com/.
2007 May 23
4
autotest and rspec for a non-rails project
hi list -
should it be possible to use autotest to continuously run specs for a
non-rails project? when i execute autotest in the base directory of my
project, it complains that it cannot load rspec_autotest, however looking at
rspec_autotest[1] and rspec_rails_autotest.rb, it appears as though both are
geared towards rails (perhaps even rspec on rails).
cheers,
jean-pierre
[1]
2007 May 01
6
rspec and autotest
If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you''ll
want to read this blog:
http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and-autotest-zentest-3-5-2
Enjoy!
David