Displaying 20 results from an estimated 2000 matches similar to: "StoryRunner docs/guidance"
2007 Sep 19
1
Strange error in StoryRunner (was: Mocks in StoryRunner)
Hi,
I''m posting this stack trace again because it keeps popping up,
seemingly as the ''default error'' when something is wrong with my story
code; for instance, I got it when I referenced a variable in my
''Given'' that I had forgotten to pass into the block.
Now I''m getting it when I attempt to post to a login action:
And ''user is
2007 Sep 14
2
Mocks in StoryRunner
Hi,
I''m trying to get up and running with StoryRunner. I have a story that
looks something like the following, but the call to mock_model
produces the exception listed below. Am I just misunderstanding the
concept? Are mocks not meant to be used in stories like this? Or is
this a bug? Changing @user to be an actual AR object makes things run
without error.
ENV["RAILS_ENV"] =
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/
shoulda/) on a project and I saw some things that would be really nice
to see in rspec, namely the should_ methods, and especially the
should_be_restful method. Do these go against the rspec goals at
all? Or could an ambitious programmer go to town implementing these
for rspec_on_rails?
Nathan Sutton
fowlduck at
2007 Aug 21
7
mocking singletons
How can I safely mock a singleton without the mocked method living on
outside the scope of the test method?
I''ve run into this problem with mocking methods on globals (gasp!) in
the past by doing something like
def mock_my_global
original = $my_global
$my_global.expects(:foo).returns(''bar'')
yield
$my_global = original
end
Is there something similar I
2007 Dec 11
14
Attachment-fu + Story Runner
Hi all,
I''m trying to run a Story Runner integration test that uploads a file
through Attachment-fu.
I''ve tried various ways of specifying the file data, from custom mocks:
class MockFile < Struct.new
(:original_filename, :read, :content_type); end
fdata = MockFile.new "test_upload.txt", "Test Upload", "text/plain"
to
2007 Oct 25
4
Insure a method is called with no arguments.
We''ve been working with the ParameterMatchers (so cool!) but I don''t
see a way to insure a method is called with no arguments.
I imagined something like:
user = mock(''User'')
user.expects(:friends).with(nothing)
Anyone run into this?
2007 Jun 17
2
Testing a call to super
Hi,
Is there or could there be any way to test that a method calls "super"?
Thanks
--
Jonathan Leighton, Web Developer
http://jonathanleighton.com/
2006 Apr 10
8
Advice on Similar Views with Helpers
I have some embedded tables that form different sections of a view. I
find that I use the same look for certain ones which means I have to
duplicate the same exact table for each section that''s similar.
Is there a way to do.. hmm.. well.. kind of like what a layout does
using @content_for_layout, but for a partial. Does that make any sense
whatsoever? :)
OK so here''s some
2007 Jul 16
4
Set the return value to "same as block"
It would be good to be able to set the return value to be the same as
the return value of the block. I am trying to test opening a file in a
block and reading from it. It would be nice to use code like this:
object.stubs(:open).with("/path/to/file", "r").yields(
stub(:read => "The file contents")
).returns(from_block)
Which would make open() take the return
2010 Sep 17
3
How to create a project with an older version of rails
Hi,
I have installed Rails 3 on my local machine. Let''s say I wan''t to
create a new project but in version 2.3.5, can I do that?
Greg
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2011 Sep 25
2
Noob Rails patcher - problems running the sqlite3 tests...
Hi,
I am following the guide here:
http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html
I have an ubuntu 11.04 VM setup, installed rvm, and ruby (ruby 1.8.7
(2011-06-30 patchlevel 352) [x86_64-linux]).
Pulled down the rails from github and created a 3.0 branch:
$ git branch --track 3-0-stable origin/3-0-stable
$ git checkout 3-0-stable
I can run the non-db tests ok, all pass
2011 Mar 22
3
Rails 3.0.6 ETA?
Hello,
Is there some Rails 3.0.6 ETA? I am asking because there are some
security holes in Rails 3.0.3, which are currently available in Fedora
15. So is it right time to update Rails to 3.0.5 or is it worth of
waiting for 3.0.6?
Vit
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to
2006 Dec 21
6
Rails'' send_file, Mongrel, and *gasp* memory
I''ve had a right fun few days at work trying to figure out why our Rails
app (which isn''t under very heavy load) kept eating memory and bringing
our server to our knees. Eventually I traced it to send_file (which was
in a way a relief as it wasn''t down to my coding ;) -- every time a user
started downloading, the memory consumed by the app would jump, and
2007 Jan 19
2
Rails Deploy Files - Remove?
So, now that we''re using Mongrel and not the horrid FCGI, do I really
need these files in my Rails apps:
dispatch.fcgi
dispatch.cgi
.htaccess
??
The .htaccess file has rules for rewriting that look FCGI based. For
Mongrel, I do my Apache re-writing in my config file, right?
is there a reason to include these files at this point?
Hunter
2007 Dec 26
3
executing code after each step of a story
Hello,
how can I execute some code after each step of a story. Is there some
kind of listener documentated.
Thank you in advance,
Armin
1997 Oct 23
1
NT domain logon questions
Hi. Myself and a anti-Micro$oft companion tried to get
NT domain logons working yesterday and seem pretty close, but
not quite.
Samba is 1.9.18alpha3, server is an Ultra-2 running SunOS 5.5.1.
Encrypted passwords seem to be working, a la smbclient and mostly
from NT, "mostly" because it *seemed* to be working but we did
have some problems with home directories in smbpasswd changing
2011 Feb 11
11
CSRF protection in rails 2.3.11
Hi all,
I think CSFR protection broke in rails 2.3.11.
As in: it''s turned off now.
I tried this in rails 2.3.10 and in 2.3.11 and 2.3.11 seems broken.
>rails csrftest
>cd csrftest
>script/generate scaffold post title:string
>rake db:migrate
now I visit /posts/new in my browser, use firebug to delete or change
the authenticity token, and submit the form.
rails 2.3.11: all
2012 Apr 07
3
Is require_dependency supposed to be a public API?
If so, shouldn''t it be documented in the Rails API?
Or is there a better way to allow class reloading of my files under lib.
I mean, I know about config.autoload_paths, but I want to be explicit
about my requires. I just want to be able to reload then on each request
when I''m working on them.
require_dependency seems to do just that but I''m worried since it is not
2011 Sep 08
4
In Rails 3.1 Model.count() ignores :include - no outer join in generated SQL
Hello!
At first I posted this in rubyonrails-talk, but no one there was able to
tell me if this is a bug or not (I got only suggestion for workaround).
As this looks like 3.1 regression that breaks existing 3.0.10 code I decided
to post this here in addition.
I''ve upgraded to Rails 3.1 (from 3.0.10), ran my test suite and found this
issue:
class Trade < ActiveRecord::Base
1998 Jan 28
2
NT - Not allowed from this workstation
I am the sysadmin in an office with an overabundance of Win95 machines and
a few NT 4.0 workstations. All installs went relatively easy for logon
scripts, wins, etc. I have run into a semi-serious problem with 2 of the
3 NT workstations. (All running the same service pack - 1).
When trying to make a share from one of the 2 remaining workstations, I
will recevie an error message saying that: