search for: linow

Displaying 20 results from an estimated 71 matches for "linow".

Did you mean: lnow
2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo, "123") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2007 Oct 02
6
color output?
does story runner have commandline options ,eg to add color to output?
2007 May 29
12
questions rspec on rails
Hi, rather than flooding this list with separate emails, I''ve been queueing up questions using rspec with rails. (an irc channel would be nice too :) Here ya go... - Is there a way to test named routes? - Could I get an example how to test an ajax request (link_to_remote)? would that go in view? and/or in controller spec? - Can you assert which layout template is rendered in a
2007 Dec 22
4
StepGroup ?
Hi, I have a need for the StepGroup feature in stories but not clear what''s the current api. Could you provide an example? In my case I have several scenarios which vary in the Givens, but not the results. Ideally I''m hoping to achieve something like: (but anything will do for now :) Scenario: one Given something When he does foo Then good things should happen
2007 Oct 12
6
locals in partials
hiya, in specing a partial, how can i assign a local var that is normally passed via :locals ? i tried adding :locals => to the render call but that doesnt seem to take linoj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071012/fd0acd92/attachment.html
2007 Jun 12
8
rdebug spec ?
Can you run rdebug on specs? I get errors when I try: $ rdebug spec ./spec/models/select_option_spec.rb ./spec: Is a directory - ./spec (Errno::EISDIR) from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ rdebug:136:in `debug_load'' from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ rdebug:136 from /opt/local/bin/rdebug:16:in `load''
2007 May 29
4
rspec and autotest (was: questions rspec on rails)
Do have the latest versions? RSpec-1.0.3 ZenTest-3.6.0 ---------- Forwarded message ---------- From: Jonathan Linowes <jonathan at parkerhill.com> Date: May 29, 2007 11:47 AM Subject: Re: [rspec-users] questions rspec on rails To: rspec-users <rspec-users at rubyforge.org> Hi, I should have mentioned I already did that. Here''s my spec.opts file --colour --format progress --loadby mtime...
2007 Nov 20
4
cap deploy:spec
fyi, I just posted this http://www.vaporbase.com/postings/Running_rspec_after_you_deploy - linoj
2009 Jan 24
4
nokogiri selector help
hiya, i want the selector that would return a <tr> of a table if any td contains some text, so i can use it in click_link_within e.g. When I click the "show" link within the row containing "user at example.com" When /^I click the "(.+)" link within the row containing "(.+)"$/ do | link, text| selector = ?? click_link_within selector, link
2007 Oct 29
7
rake spec default environment
hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one and proceeding with the tests. When I remove the development database, the specs wont run. How do i initiate rspec to be test environment from the start? I dont see this when i run using script/spec linoj
2008 Jan 23
6
sharing specs in a subclass
Hi I''ve spec''d a class and they pass. Now I''d like to assure that any subclass of this class also passes the same specs. Any suggestions for a clever way to handle this? I''d prefer to keep the existing specs as is (eg instead of moving everything into shared behaviors, or doing something to all the ''describe'' lines) thanks linoj
2007 May 30
6
authentication mocks
hi I''m using restful_authentication and have controller specs working using users fixtures (and login_as) however i''ve been trying for hours without success to do it without fixtures, using mocks and stubs instead. anyone here done this? got code? :) thanks
2007 May 22
5
rails edge
hi, first time trying rspec, and rails edge. Are there any known issues running rspec with rails edge? for one, apparently script/generate scaffold_resource has been renamed just "resource". Do I just search/replace "scaffold_resource" with "resource" in file rspec_resource_generator.rb ? Somethings still missing. before i get "Couldn''t find
2007 May 23
3
log file
hi, When running rails spec tests is there a log file generated? i''m looking for generated sql to help me debug like in development.log or is there a way to run the test against a webrick server so i can see logs? (i''m not running with spec_server at the moment, it doesnt seem to work well with autotest) thanks linoj
2007 May 25
4
rspec on rails update question
I''m sure this is OT but I''d appreciate the help I''m using rspec_on_rails I prefer to use stable release rather than live dangerously (at least until I can tell the difference between what I might be doing wrong vs problems in rspec). However, I would like to try the RspecScaffoldGenerator fix. I installed (per the docs) last week with the following commands
2007 Oct 17
4
works in script but not in rake
Hi, This is weird All my current spec examples are passing (about 750 of ''em) except a set of 6 in a specific controller spec. I get the following failure on each 6 when I run it via $ rake spec for example: --- ActionController::UnknownAction in ''MembershipsController handling PUT /project/ID/membership/N/accept should flash message'' No action responded to
2007 Jun 03
3
should_receive.again
Hi, It appears that if I have 2 should_receives in a row, the latest one overrides the previous one(s). If there isn''t one, could we add a way to accumulate them, such as @thing.should_receive(:method).and_return(@value) @thing.should_receive(:method).again.and_return(@value) @thing.should_receive(:method).again.and_return(@value) would be equivalent to
2007 Oct 20
14
Problems with form_for and partials
i''m having problem with a form_for situation where i''m trying to DRY out the repeated parts of my forms and put them in common/form and render the form elements via another partial in controller_name/_form. Here''s the first form # app/views/common/form <% form_for ... do |f| -%> <%= render :partial => "params[:controller]/form", :object => f
2007 Dec 04
10
Unexpected message on :attr_accessor
This may be a dumb noob issue, but I haven''t found any answers while seaching the forum-- I have a controller method def edit @user = User.find params[:id] @user.password_confirmation = @user.password end The User class has an "attr_accessor :password_confirmation" definition (so "password_confirmation" doesn''t exist in the users table). My spec
2007 Jun 02
7
I''m really bad at controllers, help please.
Hey, Sorry for so many questions - I''m really bad at this right now. I''m trying to cover the following code w/ rspec def index if params[:user_id] @user = User.find(params[:user_id]) @messages = @user.messages end end So basically what I''m doing is listing all the messages for a user, provided there is an id parameter. describe