Displaying 20 results from an estimated 4000 matches similar to: "Functional testing Pretty Urls"
2006 Apr 04
4
Freezing Architecture-Dependent Gems such as Rmagick, Ferret, Unicode
A lot has been made recently about the need to freeze your gems for
production deployment on a shared server so your application can depend on
it''s own gem version instead of being subjected to whatever gem is installed
on the server, but does this rule of thumb come with an exception?
Architecture dependent gems such as RMagick, Ferret and Unicode have
dependencies that cannot be
2006 May 30
3
act_as_dom_tree
im thinking about extracting this into a plugin, but it currently relies
a couple gems and another rails plugin. is there a dependency management
feature with ./script/plugin? i never could get it to check anything out
of SVN let alone install dependent stuff...
--
Posted via http://www.ruby-forum.com/.
2006 Oct 13
6
If I stub do I have to mock as well?
Hi, I''m new to mocha and stubba but eager to learn. I have a rails
functional test in which I would like to stub an instance method of
particular class to always return true. I tried the following:
def test_post_checkout
Order.any_instance.stubs(:successful?).returns(true)
post :checkout
assert_response :redirect
assert_equal "Checkout was successful.",
2007 Nov 13
7
rails story runner returning a nil response code
Has anyone noticed any problems with the Rails story runner returning
a response code of "0" when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
http://pastie.caboo.se/117497
Regular controller specs pass as expected.
--
Josh Knowles
phone: 509-979-1593
email: joshknowles at gmail.com
web: http://joshknowles.com
2006 May 25
13
.NET developer trying to understand some Rails basics
Hi All,
I''ve been a ASP.NET developer for the last few years and consider it to
be a pretty productive environment to work with. However, the
object-relational mapping (ActiveRecord) and simplicity of the Rails
framework and Ruby in general really appeals to me. .NET currently
doesn''t have something like Rails'' ORM - atleast not out-of-the-box.
Here''s my
2008 May 22
2
Story / Redirection to static html within public
With a rails application I''m trying to access the public/ folder from
within a rspec story.
I have a controller which redirects to:
/public/static_html_page.html
I have a story written using webat.
This story uses the above controller and it expects the redirection.
This story always fails as within the story it cannot follow the
redirection (Always gives a 500 error). It does not
2006 Aug 08
2
Resources and pretty URLS
Using the brand-spanking new map.resources for REST goodness, is there a
way to pass in additional parameters, or do I have to go back to
standard routes. For example, is there a way to use the map.resources
to response to urls like:
/blog/2005/02/03/ => :controller => :blog, :action => :show, :year =>
2005, :month => ''02'', :day => ''03''
2006 Mar 05
0
Pagination + pretty URLs
Hello all.
I want to make pagination URLs pretty instead of the ?page=2. I have
written a route like this:
map.connect ''restaurant/list_dishes/:page'',
:controller => ''restaurant'',
:action => ''list_dishes'',
:requirements => { :page => /\d+/},
:page => nil
Which appears to work. However the following only
2006 Mar 06
0
Multiple actions for one route (making pretty URLs hit different actions)
Hi all,
I''m trying to make pretty URLs using routes for some of my actions
across different controllers. For example:
http://www.example.com/london ->
http://www.example.com/articles/show_by_name/london
But if the id ''about'' couldn''t be found, then to search for it as
another action, this time from the ''branch'' controller.
2011 Apr 09
1
Pretty URLs for omega?
Hello :-)
How can the default omega URL be prettified?
http://<host_ID>/cgi-bin/omega is working fine, giving us all omega's
default CGI parameters. Now we want multiple databases which could be
accessed using http://<host_ID>/cgi-bin/omega?DB=<index_ID> but this is
starting to get messy. It will get messier when we start to customise
templates with
2006 Jul 02
5
Pretty URLs -> Routes
Hi
I am having issues with getting my pretty urls to work.
routes.rb:
map.connect '':user'' , :controller => ''front'' ,
:action => ''list'' ,
:filter => ''user''
front_controller.rb:
def list
@advert_pages, @adverts = paginate :adverts, :per_page => 10
@user =
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi
I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just
like the example in the post
http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released
However, trying it in irb gets me the following error:
>> require ''mocha''
=> true
>> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007''))
NoMethodError:
2006 Mar 26
7
MVC Design
Hello I have been using LAMP for the last 6 years and i am now finally
making the choice to move over to RoR. This MVC stuff is all very new to
me. As i have no trouble understanding ruby code... or any code for that
matter.. my challange comes in getting my head around the MVC stuff. Is
there any demos articles that you guys have seen that takes a site or a
business breif and explains where
2006 Feb 13
9
Selenium. Replacement for traditional rails functional test?
Hi list
I''ve got a bit of a philosophical question. After just having discovered
Selenium /Selenium IDE and the rails selenium plugin I''ve realized that
it''s a whole lot easier to do functinoal testing than writing the
traditional rails functional tests.
However it implies that the development database consists of
standardized test data (e.g the test & dev
2006 May 04
6
second assert_tag failling in rails integration test
Hi all,
I''m fairly new to rails and ruby, but I''ve come across an interesting
glitch and I''m not sure whether I''ve just got something wrong with my
assumptions or if it really is an error in the underlying framework...
I''ve created a bare-bones set of tests to show you where the problem is.
What follows are the steps I went through to reproduce the
2006 Jun 11
7
testcase_setup_and_teardown_with_blocks (aka "The plugin with the very long name")
Hey all,
I got annoyed recently that I couldn''t specifiy multiple chunks of
test setup and teardown code that get executed for each test. You''re
currently limited to just one setup method (unless I''m much mistaken).
Anyway, I just wrapped up my solution in a plugin. The answer: use
blocks!
class Test::Unit::TestCase
# This is overridden by the subclass and will
2006 Mar 23
5
validates_dateness_of ?
Hello all.
I don''t suppose some enterprising soul with much more skill than me has
whipped up a "validates_dateness_of" (Complete with leap year
calculations) method for use with all the other validation methods and
wishes to spread much much joy?
Cheers
Jeff "I can barely code RoR and rely on others to do the hard work"
Jones
--
Posted via
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3
continuous and one categorical – see below) and one random variable. The
data describe the densities of a mite species – awsm – in relation to four
variables: adh31 (temperature related), apsm (another plant feeding mite)
awpm (a predatory mite), and orien (sampling location within plant – north
or south).
I have read
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all,
I''d like to abstract the process of updating different portions of the
page after an Ajax request has taken place. Rather than simply putting
the extra view logic in the standard rjs template, it seems to give
better separation if there is a split between the core view logic (ie,
inserting a row in a table), and updating any associated portions of
the page.
Is this possible? I
2006 Mar 30
2
acts_as_ordered plugin
Hey all,
I''ve just put together a little plugin to easily access the neighbours of a
given model in a particular order. Read on if interested.
Install:
script/plugin install
http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered
Usage:
class Person < ActiveRecord::Base
acts_as_ordered :order => ''first_name''
end
Say you have people with first