Displaying 20 results from an estimated 2000 matches similar to: "How much test data to use in specs"
2009 May 24
11
Class method not being stubbed
Hi guys. I''m setting an expectation on a class method. For some
reason, the method isn''t being stubbed, and the expectation isn''t
seeing the call.
In KeywordListsController#create, I call the private method
#create_keywords_and_associate, which calls AdSenseHeavenParser#parse
.
Thus, some of my specs set an expectation on AdSenseHeavenParser#parse
. However, that
2008 Oct 20
5
RSpec-Rails bug with to_xml?
Hello, everyone. I''ve been lurking here for a while, but this is my first post.
I think I''ve run into a RSpec bug in a Rails project I''m working on. I
was working on a few REST controllers, and started getting failures on
a specific spec that verified whether a certain action returned XML
output. I spent quite a lot of time checking my code to see if it was
something I
2011 Mar 06
2
render_views and render_to_string
Hey guys. One of my controller actions uses #render_to_string to send back a
JSON response.
When I try to spec this, Ruby raises a NoMethodError, saying that
#render_to_string doesn''t exist in my controller action.
Here''s the controller action, spec, and output:
http://pastie.org/1640962
Any idea what I''m doing wrong? Thanks,
Nick
-------------- next part
2009 Nov 10
4
Model spec for file upload with paperclip and fastercsv
I just started my ImportsController and was this was really the way to
go:
////////import.rb/////////////////
class Import < ActiveRecord::Base
has_attached_file :csv
validates_attachment_presence :csv
after_save :process_csv
private
def process_csv
FasterCSV.foreach( csv.path) do |row|
#TODO
end
end
end
/////////import_spec.rb/////////////////
require
2008 Oct 31
2
Stubbing #javascript_include_tag in a helper spec
When writing specs for a helper method, how do you set an expectation
for #javascript_include_tag ?
describe NeighbourhoodsHelper do
describe ''#initialise_map'' do
it ''should include the "foo" JS file'' do
# expectation here
helper.foobar
end
end
end
I''ve tried replacing "# expectation here" with the
2006 May 01
17
Radiant CMS
I am pleased to announce that Radiant CMS is now publically available
from the Subversion repository at:
http://radiantcms.org/
What is Radiant?
----------------
Radiant is a no-fluff, open source content management system designed
for small teams. It is similar to Textpattern or MovableType, but is a
general purpose content management system (not a blogging engine).
Radiant features:
2006 Aug 10
1
Radiant CMS 0.5.1 - Gemdust
I am pleased to announce the release of Radiant 0.5.1 Gemdust:
http://radiantcms.org/download/
This is primarily a security update. A critical security vulnerability
has been discovered in Rails 1.1.5. It is therefore highly recommended
that you upgrade immediately. Apart from the Rails 1.1.5 upgrade, this
release includes a number of small enhancements. From the change log:
WHAT IS
2008 Jul 27
1
Radiant CMS 0.6.8 "Incise" Release
Looks like it''s time for another release of Radiant:
http://radiantcms.org/download/
Radiant 0.6.8 "Incise" adds a number of new features that enhance
support for
extensions and completes the project''s move to github. Of special note are:
* Extension installer/uninstaller scripts (script/extension) and a global
''extension registry'' at
2007 Jun 28
7
new to rails... suitable for what I wanna do?
Hi,
I have created and now maintain the website ratsdeville.com (http://
ratsdeville.com/index_e.html for english) for my brother. He creates
more and more content for it each week and I''m seriously feeling the
pain now archiving everything manually and making sure that links
works once items are archived (which I lost control of).
Like you can see, it is basically a news site about art
2011 Sep 04
3
rspec assert inclusion in..
hello,
I would like to assert that an attribute of a model has value among
those in an array. How would I do it in rspec?
Something like this...
describe OptionType do
context "shoulda validations" do
it { assert_contains :type, [''Type1'', ''Type1'']}
end
end
2006 Jul 04
11
Any CMS for Ruby on Rails..
Well i want to make a photography community site on the lines of
www.gfxartist.com , www.terminus1525.ca, www.phirebrush.com
Where the community votes for every subbmission from a artist and can
comment (like a forum)..
Now gfxartist has used probably SMARTY,php,and their own CMS.
terminus used Drupal,Gallery 2.Some one tells me that this combo is
heavy on resources and slows down sites.
2006 Jun 01
5
Content Management System
I am looking for a good CMS based on Rails that has at least these
attributes:
1. Ease of use ( as it will be used by people who are not html literate)
2. Very easy/flexible to change layout.
So far I have looked at
http://rcms.oopen.de/Home/ (have not installed it yet)
http://adminpages.flowdev.de
http://demo.radiantcms.org/admin/pages
http://www.eribium.org/eribium/
MuraveyWeb does not seem
2007 May 21
2
Rails'' fixtures suck! But what about something like this?
Sorry about the very long email, but this is a hairy topic that''s been
annoying me for some time and I decided to try to do something about.
Also, if you got this twice, I apologize too, but it didn''t seem to
have successfully gone out the first time.
Background:
----------
I''ve been dealing with Rails for about a year and a half now. I''ve
been using
2007 May 10
5
Shared behavior and_raise problem, and site aestetics
Hello,
Is anyone else having trouble with the and_raise method on mocks,
with respect to shared behaviors? If I do the following instead:
foo.should_receive(:bar).and_return { raise }
everything seems to work. I have been supplying no arguments to
and_raise, by the way.
Also, you may want to make the background in the code examples on the
home page a little lighter. I am hardly able to
2008 May 30
2
Any good Rails example app created with RSpec and Rspec on Rails?
Hi,
I''m pretty new to RSpec. I''ve been browsing http://opensourcerails.com
to find a good app built using RSpec (and RSpec on Rails). Does
anybody have a recommendation?
I wanna see example of mocks/stubs, associated models and integrated_view.
-T
2007 May 04
11
spec template for CRUD?
Hello,
Has anyone already come up with a set of shared behaviours that
someone could leverage when adhering to a CRUD concept, with respect
to controllers?
Relatedly, it would be nice if there were a way to share generalized
behaviour specs.
-Chris
2007 Apr 30
7
Migrating spec_helper with modifications
Hello,
After moving into the HEAD of rspec, I am greeted with a mountain of errors,
which I expected, due to my specs not being migrated.
I use hpricot for a lot of my view tests, as it is extremely simple to
traverse the DOM with it. I used to include HpricotSpecHelper in
spec_helper.rb, like so:
require ''hpricot_spec_helper''
module Spec
module Rails
module Runner
2007 May 03
3
0.9.2 redirect_to no longer accepts hash?
Why am I now getting these errors?
expected redirect to {:action=>"index"}, got redirect to
"http://test.host/authenticated_users"
I know in the AuthenticatedUsersController, the redirect call is
redirect_to :action => ''index''
So why should I have to convert this to a url in my specs?
2006 Mar 25
6
Polycom IP 301 is slow
Hi guys, I've been using a Polycom IP 301 for a couple of weeks now and
find that it's extremely slow for configuring. For instance, it takes
several minutes to boot up, apply any changes via the web interface takes
at least a minute, etc. Is this normal behaviour? Is there anything that
can be done about it?
Thanks,
-- Nick
e: nick.hoffman@altcall.com
p: +61 7 5591 3588
f: +61 7 5591
2007 Apr 30
3
svn head api url?
Hello,
Is there a url for the api used on the development branch, which gets
updated per commit or so? I am using rspec as a plugin, complete with the
externals property, and would like to refer to the new api while I fix all
my specs up. Thanks.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: