search for: railsecommerce

Displaying 20 results from an estimated 41 matches for "railsecommerce".

2007 Dec 03
5
spec for model_id should eql
Hello, I''m confused why the spec described below is failing. Other simple comparison specs are passing fine for the same model. The code is working accordingly when I test it through the console, I''m just having difficulty getting this spec to work. Any pointers would be appreciated. Failure message: ''Address fetch and geocode should extract department and write to
2007 Dec 04
12
params not available for controller specs?
Hi, all, I''m trying to write a spec for a controller method that starts out: def download @orders = Order.find( params[:ids] ) ... and started writing a spec that set params[:ids] to a mock. I was surprised to discover that controller specs (at least in RSpec 1.0.8) don''t offer the use of the params object (per
2007 Sep 13
2
Failing to raise an exception in a stub
...ly shouldn''t assume any args. Moreover, both cases work fine in the real app, so it seems to me something funky is happening when stubbing the method. Anyone else stumbled upon anything similar? Cheers, //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2417 bytes Desc: not available Url : http://rubyforge.org/pipermail/rspec-users/attachments/20070913/a7dcc021/attachment-0001.bin
2008 May 03
6
Everyone Using Rspec Autotest?
I haven''t been spec''ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is using? http://svn.caldersphere.net/svn/main/plugins/rspec_autotest/
2006 Dec 20
2
OSX Dashboard Widget for managing mongrels...
Hey everyone - I recently switched to using a Mac and have several different rails projects going and was getting tired of starting/stopping mongrels via the shell so wrote my first dashboard widget to do it for me. More details at the URL below... http://blog.pjkh.com/2006/12/20/mongrel-rails-dashboard-widget Hope those of you on OSX find it handy... feels good to finally give something
2007 Nov 13
2
Spec slowdown
...~20 seconds to more than a minute. The weird thing is that if I run the rake spec tasks separately (controllers, models, views, helpers), they still take about 20 seconds in total: http://pastie.caboo.se/117362 //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
2008 May 20
4
mock_model not stubbing model attribtues in view spec
Hi -- I am just getting to grips w/ view specs, and am having an issue with mock_model not stubbing the mocked model''s attributes. For instance, I have the following: <CODE> before do @input_timesheet = mock_model( InputTimesheet ) assigns[:input_timesheet] = @input_timesheet end it "should display a table element" do render
2007 Sep 13
5
Authenticating before tests
Hi all, I''m using Goldberg, an engine that provides roles based access control for my app. I need to login before I can do controller tests, but I can''t find any examples of people doing this. Could someone point me in the right direction? I thought the simplest way would be to either call the login action from my other tests before(:all), but I can''t seem to
2008 May 26
7
Mocking Models in Controller Specs...
I find myself doing this kind of thing a lot in Controller Specs: @vacancy = mock_model(Vacancy) @vacancy.stub!(:reference) @vacancy.stub!(:title) @vacancy.stub!(:created_at) @vacancy.stub!(:updated_at) @vacancy.stub!(:body) @vacancy.stub!(:contract) @vacancy.stub!(:location) @vacancy.stub!(:salary) @vacancy.stub!(:benefits)
2007 Sep 30
9
Problems with testing nested routes using mocking
Hello forum I have there to files #----- virtual_host_controller.rb class VirtualHostsController < ApplicationController before_filter :capture_domain # GET /domain/1/virtual_hosts/1 def show @virtual_host = @domain.virtual_hosts.find(params[:id]) respond_to do |format| format.html # show.rhtml end end private def capture_domain if
2008 Oct 16
2
Any good conferences this year about ruby/rspec/watir?
Hello. Sorry for this little offtopic question, but I was wondering if anyone happens to know if there''s any good conferences coming up about rspec or ruby or watir in this year where I could attend to? Or any good website where such things are listed or something similar. All suggested conferences should not take place before one month from now (employer needs some time to get good
2007 Nov 20
1
How to represent Story of Life grid in Then clause
In this story from Dan''s Game of Life: Scenario: the grid has three cells Given 3 x 3 grid When I create a cell at 0, 0 And I create a cell at 0, 1 And I create a cell at 2, 2 Then the grid should look like: XX. ... ..X How do you set up matchers for the grid at the end. Are all the indented lines after a Then passed to the Then matcher as separate
2007 Nov 21
0
Testing transactional updates in story runner
...anges would be rolled back, thus making stories not what they''re supposed to be, end-to-end tests for the application stack. Has anyone found an elegant way to circumvent this with story runner? Cheers, //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
2007 Jul 26
1
Prototype 1.5.1.1. bug, "too much recursion" line 1294
FYI, just tried to upgrade my prototype from 1.5.something to 1.5.1.1 and when I did an ajax based form submission, I my browser pegged the CPU. FireBug tells me there is too much recursion online 1294: if (!element || !element.tagName || element.nodeType == 3 || I don''t have enough time to submit a proper bug report but wanted to let people know.
2007 Jan 03
1
Added :group option to paginate method
Ok, nothing really difficult, I add the possibility to call the paginate method with the :group option. Please, someone can tell me how to submit this patch? Thanks Sandro, sandro@railsonwave.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send
2007 Nov 20
2
confirming that a model instance was correctly created from POST params
I''m wondering whether I''m wasting my time trying to verify that an addition I''ve made to legacy code is in fact setting a new attribute on a model. Substruct''s (http://dev.subimage.com/projects/substruct) OrderHelper contains this method: 1 def create_order_from_post 2 @use_separate_shipping_address = params[:use_separate_shipping_address]
2007 Sep 14
2
Testing a nested controller
Hey everyone. I really stuck on testing a nested controller. I''m trying to make a request using get and afterwards checking the response by response.should ... My routes.rb looks like this: map.resources :writers do |writers| writers.resources :notes end In my notes_controller_spec.rb def do_get writer_id = 1 note_id = 1 get note_path(writer_id, note_id) end it "should show
2007 Oct 26
2
Examples of writing controller specs that use authentication
Hello, I''m working on specs for a controller that handles authentication using the restful_authentication plugin. I''m trying to find a resource (tutorial or examples, if possible) about the best way to go about writing mocks and specs to make sure that things like my before_filters are working correctly. Does anyone know of any good resources for this? Thanks, Les
2007 Nov 25
2
Rails sessions in plain text stories
Ok, maybe I''m being particularly thick, but I''ve been trying to find the solution to this for a couple of hours now and I just can''t seem to be able to do it... I''m trying to write a step as such: Given("user $email is logged in") do |email| user = User.find_by_email(email) session[:user_id] = user.id end This is the way it would
2007 Nov 21
7
describe AddressesController, "handling GET /addresses" do
Hello, I''m working with scaffold generated controller test code for handling GET requests. Address is the model being tested. Address belongs_to Company, Company has_many addresses. In my addresses_controller I have: before_filter :get_company def index @addresses = @company.addresses.find(:all) respond_to do |format| format.html # index.html.erb format.xml {