similar to: Controller Spec & DataMapper Chaining

Displaying 20 results from an estimated 10000 matches similar to: "Controller Spec & DataMapper Chaining"

2007 Aug 24
26
testing behaviour or testing code?
hypothetical question for all you BDD experts: I want to make sure that a :list action always returns widgets in alphabetical order. There''s at least 2 ways of doing this: it "should fetch items in alphabetical order" do Widget.should_receive(:find).with(:order => "name ASC") get :list end it "should fetch items in alphabetical order" do [:red,
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
I''m trying to write specs for a plugin I''m developing named audit_fu, and I''m running into a problem which I can''t get past it. I''ve got the same specs setup in the main rails app, and everything works fine there, it''s just running the plugin specs that I''m having a problem with. My setup is: - edge rails - edge rspec (in
2008 Jun 07
2
Rails integration tests without stories
I''m looking to drive the development of a rails app that does nothing but serve a JSON API. All of the models are well tested elsewhere, so I needn''t worry about that. My only immediate goal is to be able to fire off requests to a path and check the returned JSON. I''ve tried a number of methods for this today, without being particularly enthused about any of them. I
2009 Apr 06
1
Need Help with StatET Error/Bug? on Ubuntu 8.10 amd64
Hi, I posted this message on the StatET-user board last week, but it looks like a ghost-town... I have a bad feeling that there is some code in the plug-in which doesn't work well with my environment, but if I am lucky, maybe other users have worked around this problem somehow - I am hoping that my setup is the issue. Note: very similar StatET setups on 32-bit XP Pro and Vista run
2005 Oct 14
1
join tables and position (acts_as_list)
I''m working on some schema for a new project that we''ll be doing in rails (our first rails project!). A recurring structure we are seeing is the desire to define an ordering any way we wish, so ''acts_as_list'' comes to the rescue. But, the ''position'' column seems to need to belong in the join table to make sense. For example, we have
2011 Dec 05
1
using StatEt IDE for Eclipse
Hi, I'm trying to use StatEt IDE for Eclipse as my R editor, but I'm completely lost. I've read all I could find online, made apparently all I had to do (installing rj, configuraing StatEt, etc.) but still cannot make R running. Below is the error log file. Thank you so much for assistance. Matteo !ENTRY de.walware.statet.r.console.ui 1 0 2011-12-05 16:21:51.355 !MESSAGE
2005 May 31
1
AJAX & Partials
Hi, looking to see if I''m on the right track here... we''re selling widgets to customers, but there are a number of different type of widgets and each different type of widget has a number of parameters that the customer can specify, in effect each customer orders widget''s customised in ways particular to that specific order. We use STI to store each different widget
2006 Jan 03
3
Changing tables within rails app
Hi, I want to know if my idea is possible within the rails framework. I want to write a rails app that uses the same code to manage two classes of widgets; "wired widgets" and "wireless widgets". For the most part, all the code to manage these two classes of widgets will be identical. The only differing part are some of the underlying field names in each respective db table
2007 Nov 01
1
List of Nth removed associated objects.
Given the following.. Foo has_many :bars Bar has_many ::widgets Widget has_many :gadgets Gadget has_many :parts All of the following are now possible... @foo.bars @bar.widgets @part.gadget.widget.bar.foo However, I can''t just do the opposite of that last one... @foo.bars.widgets.gadgets.parts and get a full list of every Part associated with @foo. I know there''s several
2009 Feb 11
1
Ruby on Rails: Talk | Google Groups
This is more an architectural question.... I am looking to create a domain that sells widgets (as an example) widgets.com Now I have three sales reps, that each sell different kinds of widgets, and do not need to know about each other. larry.widget.com moe.widget.com curley.widget.com I don''t want to repeat myself (of course!) with the shopping cart logic or the transactional
2009 Jun 25
1
How do I define the method for gcheckboxgroup in gWidgets?
Hi All... I?m trying to build a small demo using gWidgets which permits interactive scaling and selection among different things to plot. I can get the widgets for scaling to work just fine. I am using gcheckboxgroup to make the (possibly multiple) selections. However, I can?t seem to figure out how to properly define the gcheckboxgroup; I can draw the widget properly, I think my handler would
2012 Nov 30
1
How to add widgets of gWidgets to widgets of rgtk2 ???
I have a layout in gwidgets. To this, I wanted to add a Textbox(gtkEntry) created from rgtk2... The code is as follows: MainLayOut <- glayout(homogeneous = FALSE, spacing = 10, container = SubGroup) MainLayOut[1, 1, anchor=left] <- "Number of Total Patients: " font(MainLayOut[1, 1, anchor=left]) <- c(weight="bold") patients <- gtkEntry()
2005 Oct 15
6
R GUI considerations (was: R, Wine, and multi-threadedness)
Hello, Following a discussion initiated on r-devel, that mentions SciViews-R and other GUIs issues for R, I would like to make comments (and would be happy if these comments would initiate interesting initiatives). A big, big problem with SciViews-R is that a part of it is written in Visual Basic 6, a M$$$$ language, not supported any more, buggy, non transposable to other platforms, etc,
2006 Mar 27
4
widgets on rails?
Here''s my crazy question of the day. Has anybody played around with using Rails to create Mac OS X Dashboard Widgets? Or is that just sick and wrong? Giles
2013 Feb 12
2
Private environments and/or assignInMyNamespace
Dear DevelopeRs, I've been struggling with the new regulations regarding modifications to the search path, regarding my Rcmdr plugin package RcmdrPlugin.DoE. John Fox made Rcmdr comply with the new policy by removing the environment RcmdrEnv from the search path. For the time being, he developed an option that allows users to put the environment from Rcmdr (RcmdrEnv) on the search path,
2005 Jun 09
8
RDoc Dashboard Widget
Hi everyone - sorry if this is a bit OT, I''m not subscribed to the ''ruby-talk'' list, but if anyone wants to cross post this over there... This is just a quick announcement to let people know that I''ve built a basic RDoc Dashboard widget for Mac OS X Tiger. It''s still beta-ish, but seems to work okay for me - and it''s a convenient reference
2006 Aug 09
2
Link to most recent
Greetings all, I have a side panel in my app that needs to have a link to the most recent 4 or 5 items in a table. How do I create this link? For example, I have a controller named widgets, and I want to create a link to :controller => "widgets", :action => "show", and then the most recent id. I want the text link to be the name of the widget. Any ideas? Obviously,
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
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2005 Jun 02
1
Populating Data on a Foreign Table
the scenario... three tables, thusly: widgets ------- id widget_color_id widget_style_id widget_colors ------------- id color widget_style ------------ id style the data: widgets ------- 1 2 1 2 1 3 3 3 2 widget_colors ------------- 1 blue 2 red 3 green widget_styles ------------- 1 smooth 2 round 3 broken so, putting the associations together, we have in widgets: 1 red smooth 2 blue