/File.html#M24
On Mar 13, 2011, at 2:37 PM, Nicholas Wieland wrote:
hi Scott, thanks for the answer.
https://gist.github.com/868356
I'm not even calling it inside the specs.
ngw
On Mar 13, 2011, at 5:28 PM, Scott Taylor wrote:
How are you requiring FakeFS?
Scott
On Mar 13
How are you requiring FakeFS?
Scott
On Mar 13, 2011, at 10:30 AM, Nicholas Wieland wrote:
Hi *, for some reasons I'm not able to fake writing on the FS during specs
with carrierwave, someone managed to make it work ?
I'm currently trying to use FakeFS, but apparently I'm not even able to
Welcome everyone (and double welcome to Pat)! Thanks for your hard work, guys!
Cheers,
Scott Taylor
smtlaissezfaire
On Mar 1, 2011, at 8:46 AM, David Chelimsky wrote:
I'm very pleased to announce the reformation of a core RSpec development team:
Chad Humphries, a.k.a. spicycode, has been
Is #unstub being called at any point?
Scott
On Feb 16, 2011, at 12:54 AM, Fearless Fool wrote:
I'm looking at an example where a stub seems to work sometimes, and
sometimes appears to become unstubbed. I haven't boiled it down to a
minimal example, but it goes something like this:
Probably manually rescuing your debugger call would work:
begin
debugger
rescue Exception
end
Scott
On Feb 3, 2011, at 9:18 AM, David Kahn wrote:
I am curious as with Test::Unit I could go into the debugger and stay all day
inside of a test and make all kinds of errors without a problem.
On Feb 3, 2011, at 12:04 PM, David Kahn wrote:
On Thu, Feb 3, 2011 at 10:32 AM, David Chelimsky dchelim...@gmail.com wrote:
On Feb 3, 2011, at 9:28 AM, David Kahn wrote:
On Thu, Feb 3, 2011 at 8:48 AM, Scott Taylor sc...@railsnewbie.com wrote:
Probably manually rescuing your debugger
:
On Nov 6, 2010, at 5:04 PM, Scott Taylor wrote:
I have some javascript specs (using the jspec javascript framework) in my
rails 3 project, living in the spec/javascript directory. How can I exclude
the ruby files in the jspec project from being run when I run rake spec?
RSpec::Core::RakeTask
I have some javascript specs (using the jspec javascript framework) in my rails
3 project, living in the spec/javascript directory. How can I exclude the ruby
files in the jspec project from being run when I run rake spec?
RSpec::Core::RakeTask used to take a file list (which was usually
On May 26, 2010, at 2:07 PM, Nadal wrote:
I wrote following code and it did not work.
describe User do
it { should validate_presence_of(:email) }
pending should raise an error when email is blank and record is
saved with false option
end
Then I put pending inside it like one given
Hey all,
I'm wondering if anyone has any experience with an automated test-case
generation tool like Quickcheck (for erlang/haskell). I'd be interested in
hearing any impressions, war stories, or dev workflows regarding a tool like
this. Talking off list to David C, he suggested that it
On May 14, 2010, at 8:25 PM, Stu wrote:
Hi,
I have a non-Rails Ruby project that uses RSpec. It needs a shared
collection of fixture-like objects created, although they have nothing
to do with Rails, AR or database entries:
w1 = Widget.new(10)
w2 = Widget.new(20)
w3 = Widget.new(30)
On May 16, 2010, at 8:13 PM, David Chelimsky wrote:
On May 16, 2010, at 12:54 PM, Scott Taylor wrote:
Hey all,
I'm wondering if anyone has any experience with an automated test-case
generation tool like Quickcheck (for erlang/haskell). I'd be interested in
hearing any impressions, war
On Apr 16, 2010, at 8:15 AM, Nicholas Wieland wrote:
Hi *,
I'm trying to write a plugin to integrate my SSO server into my rails app.
I'm finding the whole process quite difficult, I'm still blocked at
configuring rspec, and the lack of documentation is not helping.
I've put this inside my
On Mar 11, 2010, at 1:26 AM, Nicolás Sanguinetti wrote:
We have an app that has extensions that are built as rails engines.
Each engine needs some code in the controllers, which we solved as
include this module, call a method. In order to test it, though, we
don't want to copy the test for
On Mar 11, 2010, at 1:26 AM, Nicolás Sanguinetti wrote:
We have an app that has extensions that are built as rails engines.
Each engine needs some code in the controllers, which we solved as
include this module, call a method. In order to test it, though, we
don't want to copy the test for
On Feb 22, 2010, at 1:54 PM, Matt Riches wrote:
I am hoping that this is an easy question to answer!
I have 2 models, related via an association model, such that models a and b
use has_many to refer to each other, and also the association.
has_many :through with an extra table, or HABTM?
On Feb 22, 2010, at 6:07 PM, Rick DeNatale wrote:
I thought that it might be worth starting a discussion about the best
approaches to deal with spec'ing what's becoming more and more common
in apps using active record.
It started with named scopes, now we have arel, and the old find calls
On Nov 23, 2009, at 9:35 PM, David Chelimsky wrote:
On Fri, Nov 20, 2009 at 9:06 PM, Bogdan Dumitru dumbog...@gmail.com wrote:
The syntax for use_fakefs changed in version 0.2.1 and the fixtures
for rspec are generating errors, but it can be solved easily.
Have to change ...
describe smth
On Nov 23, 2009, at 11:12 PM, David Chelimsky wrote:
On Mon, Nov 23, 2009 at 9:36 PM, Scott Taylor sc...@railsnewbie.com wrote:
On Nov 23, 2009, at 9:35 PM, David Chelimsky wrote:
On Fri, Nov 20, 2009 at 9:06 PM, Bogdan Dumitru dumbog...@gmail.com wrote:
The syntax for use_fakefs
On Oct 14, 2009, at 3:36 PM, Joaquin Rivera Padron wrote:
hello there,
how do you tipically spec private methods? The thing is Ï have
something like this:
def some_method
complex_method + other_complex_methods
end
private
def complex_method...
def other_complex_methods ...
and the two
On Oct 14, 2009, at 4:24 PM, Nicolás Sanguinetti wrote:
On Wed, Oct 14, 2009 at 5:49 PM, Scott Taylor
sc...@railsnewbie.com wrote:
On Oct 14, 2009, at 3:36 PM, Joaquin Rivera Padron wrote:
hello there,
how do you tipically spec private methods? The thing is Ï have
something
like
On Oct 12, 2009, at 9:14 PM, David Chelimsky wrote:
On Oct 12, 2009, at 9:37 PM, Sam Woodard wrote:
I have an interesting setup: I am using rspec for mocking but I have
mocha installed which give me access to any_instance, expects,
etc. The
problem that I am having is that I want to
On Sep 17, 2009, at 3:13 PM, Chris Adams wrote:
Hi there,
Forgive the simple sounding question, but I'm struggling to
understand how to spec helper methods in Rails work, and I'm having
no joy, and after spending far, far too long staring at broken code,
I'm hoping someone on the list
Torrens Street
London
EC1V 1NQ
email: ch...@stemcel.co.uk
web: www.stemcel.co.uk
twitter:chris_d_adams
skype: chris.d.adams
mob: 07974 368 229
tel: 0207 558 8971
2009/9/17 Scott Taylor sc...@railsnewbie.com
On Sep 17, 2009, at 3:13 PM, Chris Adams wrote:
Hi there,
Forgive the simple sounding
Jeremy Hageman wrote:
Scott thanks for the insight.
On Sep 1, 9:16 pm, Scott Taylor wrote:
Most mocks used in a rails project server neither of these purposes.
Primarily they are used for speed - which so far has been the primary
trade off with using a fixture replacement
Jeremy Hageman wrote:
As someone relatively new to rspec, I am interested in hearing the
wisdom of the group in the area of using a fixture replacement gem
(such as machinist or factory girl) instead of mocking the model. To
me it seems that using a fixture replacement, instead of a mock, would
On Aug 25, 2009, at 6:39 PM, Joaquin Rivera Padron wrote:
hey there,
I have a question that may be raised from some misunderstanding of
my current problem. But the answer might well serve me for other
things.
The issue is I would like to be able to metaprogramatically (this
may be a
On Aug 14, 2009, at 7:04 AM, Rob Aldred wrote:
Hi, I've been trying to work this out for a while, im convinced its
some local db configuration specific to my machine.
When running `rake spec` 14 of my test fail all of them in the
user_spec generated by restful auth.
The error for all the
On Jul 13, 2009, at 12:09 PM, Adam Anderson wrote:
I can't seem to find a good way to do this. If I stub out Time.now
in one of my specs but need to return it to its original
functionality then can I remove the stub?
So I'd like to say something like:
Time.stub!(:now).and_return(foo_time)
.
You might also want to check out this library:
http://github.com/notahat/time_travel/tree/master
Scott
-Adam
On Mon, Jul 13, 2009 at 9:58 AM, Scott Taylor
sc...@railsnewbie.com wrote:
On Jul 13, 2009, at 12:09 PM, Adam Anderson wrote:
I can't seem to find a good way to do this. If I stub
On Jul 13, 2009, at 1:46 PM, Scott Taylor wrote:
On Jul 13, 2009, at 1:32 PM, Adam Anderson wrote:
Thanks for the reply, Scott.
What you describe is what is currently being done.
now = Time.now
Time.stub!(:now).and_return(foo_time)
do_stuff
Time.stub!(:now).and_return(now)
However
On Jul 13, 2009, at 2:12 PM, David Chelimsky wrote:
On Mon, Jul 13, 2009 at 1:04 PM, Scott Taylorsc...@railsnewbie.com
wrote:
On Jul 13, 2009, at 1:46 PM, Scott Taylor wrote:
On Jul 13, 2009, at 1:32 PM, Adam Anderson wrote:
Thanks for the reply, Scott.
What you describe is what
On Jul 13, 2009, at 2:15 PM, Scott Taylor wrote:
On Jul 13, 2009, at 2:12 PM, David Chelimsky wrote:
On Mon, Jul 13, 2009 at 1:04 PM, Scott
Taylorsc...@railsnewbie.com wrote:
On Jul 13, 2009, at 1:46 PM, Scott Taylor wrote:
On Jul 13, 2009, at 1:32 PM, Adam Anderson wrote:
Thanks
Chris Sund wrote:
Hey everyone,
This is a noob question. I'm not grasping the difference between
describe and context in my spec file. As an example, what's the
difference with this...
describe Game do
context starting up do
it should send a welcome message do
Andy Shipman wrote:
When running spork on a merb application, whenever a spec is run I get
the following error from the Spork server.
/opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0.11/lib/merb-core/bootloader.rb:1358:
[BUG] rb_gc_mark(): unknown data type 0x3c(0x2203d0) non object
ruby
On Jun 15, 2009, at 4:11 PM, Andy Shipman wrote:
On 15 Jun 2009, at 14:43, Scott Taylor wrote:
Andy Shipman wrote:
When running spork on a merb application, whenever a spec is run I
get the following error from the Spork server.
/opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0.11/lib/merb
Hunt Jon wrote:
What's the difference between spec:server and autospec?
I wouldn't recommend using spec server - use spork instead:
http://github.com/timcharper/spork/tree/master
Both load the rails environment, so that each time you run your tests
(with script/spec -X or script/spec
.
The *whole point* of the drb server is to speed up load time when
running specs.
Just to give you an idea, here's the difference for me (with spork
instead of the spec server):
http://screencast.com/t/qhRvqiXc
Scott
Can anybody explain to me, please?
On Thu, Jun 4, 2009 at 3:24 PM, Scott
David Chelimsky wrote:
On Fri, May 1, 2009 at 12:26 PM, Matt Wynne m...@mattwynne.net wrote:
I'm creating a class in my spec file to test out a module, but when I run
the spec a second time in spec_server, I get the error above.
I presume this is because rails is un-loading the class, and
David Chelimsky wrote:
On Wed, May 27, 2009 at 5:20 AM, Smita Sreekanth li...@ruby-forum.com wrote:
Hi,
We run the feature created for a form to identify the fields and also to
add data into the respective fields.
But while running the cucumber features, all the scenario and steps are
On May 27, 2009, at 4:59 PM, Matt Wynne wrote:
On 27 May 2009, at 14:36, Scott Taylor wrote:
David Chelimsky wrote:
On Fri, May 1, 2009 at 12:26 PM, Matt Wynne m...@mattwynne.net
wrote:
I'm creating a class in my spec file to test out a module, but
when I run
the spec a second time
On May 26, 2009, at 1:22 PM, Mark Wilden wrote:
On Sun, May 24, 2009 at 10:17 PM, Ben Mabey b...@benmabey.com wrote:
Well, so Spork was really created with testing in mind. It is more
general purpose than spec_server though. You can use it with any
Ruby project, not just Rails. You can
On May 26, 2009, at 2:31 PM, Ben Mabey wrote:
Scott Taylor wrote:
On May 26, 2009, at 1:22 PM, Mark Wilden wrote:
On Sun, May 24, 2009 at 10:17 PM, Ben Mabey b...@benmabey.com mailto:b...@benmabey.com
wrote:
Well, so Spork was really created with testing in mind. It is
more
Ben Mabey wrote:
Scott Taylor wrote:
Ben Johnson wrote:
Did anyone ever figure out the factory_girl / machinist issues? I am
having the same problems and can figure out how to fix it for the
life of me. The first run works fine, then afterwards I get a bunch
of these errors:
No blueprint
Ben Johnson wrote:
Did anyone ever figure out the factory_girl / machinist issues? I am
having the same problems and can figure out how to fix it for the life
of me. The first run works fine, then afterwards I get a bunch of these
errors:
No blueprint for class Venue
Any ideas? Thanks!
Denis Haskin wrote:
Thanks. Ok -- removing grosser-autotest lets autotest run, but it's
only running my unit tests, not rspec:
$ autotest
(Not running features. To run features in autotest, set
AUTOFEATURE=true.)
loading autotest/rails
/usr/bin/ruby1.8 -I.:lib:test -rubygems -e
Kero van Gelder wrote:
Is there some configuration I need to do to get rid of unit/functional
tests and only run rspec+cucumber?
[...]
I guess I should add this in some form to the rspec wiki ;)
Done:
http://wiki.github.com/dchelimsky/rspec/autotest-integration
+1.
you now have), and rspec
(and rspec-on-rails, if you are in a rails project).
Aslak used to have some good abbreviation for this phrase: what versions
of everything are you using?
- rspec
- rspec on rails (if in a rails project)
- rails (if in a rails project)
- OS
Scott
dwh
Scott
Denis Haskin wrote:
Hmm. Okay, tried that but:
$ autospec
(Not running features. To run features in autotest, set
AUTOFEATURE=true.)
loading autotest/rails_rspec
Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.
I'm running my rails rspec examples just fine manually...
On May 11, 2009, at 7:10 PM, court3nay wrote:
Before upgrading from 1.1.11 to 1.2.4 I used to be able to do this:
ruby spec/models/user_spec.rb
I would assume that would work if you are requiring test-unit interop
mode. I believe in previous versions of rspec it was automatically
court3nay wrote:
Hey all, just upgraded an older app to latest rspec and rails. This
code runs fine in console but fails under rspec.
class User
has_many :statuses, :extend = Status:::AssociationExtension
end
module Status::AssociationExtensions
def after(status)
Denis Haskin wrote:
I'm having a devil of a time getting some global before behavior to
work the way I think it should.
I have a set of controllers that are used only by administrative
users, so login is required. To run examples just against the
functionality, ideally I'd like to be able
On May 7, 2009, at 7:32 AM, jevado wrote:
Hi All,
I'm busy experimenting with RSpec and encountered a small issue with
the scaffolding.
As soon as I chooce mocha as my mocking framework in the spec helper
the specs created with rspec_scaffold fail. Is this a bug or do the
rspec_generators
On Apr 30, 2009, at 2:26 PM, Amos King wrote:
I started a brand new rails app and then ran the following.
%git submodule add git://github.com/aslakhellesoy/cucumber.git
vendor/plugins/cucumber
%git submodule add git://github.com/brynary/webrat.git vendor/
plugins/webrat
%git submodule add
On Apr 8, 2009, at 11:09 AM, Andrea Jahn wrote:
Hi,
I added one line in my controller to extend the params hash. But now
I get errors
in my controller spec.
Controller
def update
@pl_planning = PlPlanning.find(params[:id])
# the item model version (select box) depends on
On Apr 7, 2009, at 7:47 AM, TimBooher wrote:
I am trying to get my workflow down and am confused on several fronts.
The first is how to get my rspec_scaffold tests to run. The problem is
that i generated my scaffold, then moved my controller into a
namespace named :admin.
So I have the
On Apr 7, 2009, at 11:54 AM, Ben Mabey wrote:
On Apr 7, 2009, at 8:30 AM, aidy lewis wrote:
On 07/04/2009, Zach Dennis zach.den...@gmail.com wrote:
On Mon, Apr 6, 2009 at 12:21 PM, Ben Mabey b...@benmabey.com wrote:
My best
suggestion would be to set multiple breakpoints and hit c to
On Apr 7, 2009, at 1:32 PM, James B. Byrne wrote:
I have run into a minor glitch and would like to know what others
think. I am working on a test/expectation and as part of the
process of debugging I am rolling back db:migrations one step at a
time to discover where the problem was
On Apr 7, 2009, at 4:26 PM, Sophie (itsme213) wrote:
Some time ago I had come across a web-based story editor for
scenarios. I'm
not sure if it was a full runner, and it was probably before cucumber.
Anyone know where I can find it?
Aslak had a prototype a while back - although it was
On Apr 7, 2009, at 5:19 PM, aslak hellesoy wrote:
Ben Mabey has accepted my invitation to be on the core Cucumber team.
Ben has been a long time contributor to Cucumber's ecosystem and
knows it inside out.
Here is a quote from IRC today:
mabes: Yeah but you're the cucumber God.
The core
On Mar 31, 2009, at 12:08 PM, Fernando Perez wrote:
Hi,
I just ran into this issue. I have a method that returns: false, true,
nil or an object.
This method is used by another method to test for true/false. In Ruby
that's easy to handle as nil and false evaluate to false, and
everything
On Mar 27, 2009, at 4:38 PM, jakepaul wrote:
I can't figure out what is causing this problem. I'm using the
latest rspec
and rspec-rails gems on rails 2.3.2.
When I run autospec, the tests in the model spec that I am editing
will all
fail. The error messages are like this:
, which is how they come out of the
box...
I was thinking of any explicit requires which may occur in app/ and lib/.
AFAIK, this is more of a rails loading issue than an rspec one.
Scott
Thanks for your help,
Andrew
On Mar 29, 12:12 am, Scott Taylor sc...@railsnewbie.com wrote:
Andrew
andrea wrote:
Hi,
I recently migrated from classic rails testing to Rspec, so I am
pretty new to the framework and still learning. I am getting weird
errors on an ActiveRecord model test, here is the basic class model
definition:
class Size ActiveRecord::Base
has_many :quantities, :dependent
On Mar 19, 2009, at 10:30 AM, David Chelimsky wrote:
On Mar 19, 2009, at 7:59 AM, Evgeny Bogdanov evgeny.bogda...@gmail.com
wrote:
just upgraded to 1.2.0
the following code works now:
template.stub!(:render).with(hash_including(:partial = children/
child))
Val wrote:
Okay. Thanks for your responses.
I guess I'll try splitting them into separate directories. Will each
directory automatically include it's own spec_helper.rb?
Are you using any features from one mock framework that aren't present
in the other? If not, potentially you could,
David Chelimsky wrote:
On Sat, Mar 7, 2009 at 3:03 PM, Nathaniel Brown n...@inimit.com wrote:
I get the following error using both edge version of the TM bundle and
rspec/rspec-rails in vendor/plugins.
/Users/nshb/Library/Application Support/TextMate/Bundles/
Levy Carneiro Jr. wrote:
Hello!
I'm trying to spec a method, that has several chained calls.
http://gist.github.com/78562 (spec)
http://gist.github.com/78563 (model)
In the first spec, I'm trying to focus on the method calls that have
to be made, and the arguments they should receive.
Is
On Mar 12, 2009, at 5:50 PM, Bill Venners wrote:
Hi All,
I've been working on BDD support in a test framework for Scala
imaginatively called ScalaTest, and I want to add support for the
notion of pending examples. I see three different forms of pending
in RSpec, and I'm curious to hear which
Bill Venners wrote:
Hi Aslak and Scott,
Thanks for your replies. I have a couple quick follow up questions.
On Thu, Mar 12, 2009 at 3:05 PM, aslak hellesoy
aslak.helle...@gmail.com wrote:
On Thu, Mar 12, 2009 at 10:50 PM, Bill Venners b...@artima.com wrote:
Hi All,
I've been working
On Mar 9, 2009, at 4:53 PM, James Byrne wrote:
Pat Maddox wrote:
ActiveRecord doesn't know anything about db constraint errors. If
one
is violated, the error propagates up in the form of an exception.
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which
Phlip wrote:
The question is why did RSpec throw away the backtrace? Am I the
first person in history to hit a programming error inside RSpec??
Nope, but this probably isn't one of them.
I said it wrong. The complete venting goes Am I the first person in
history to use RSpec, and then hit
Phlip wrote:
Tero Tilus wrote:
Line 192 contains neither a stray nil nor a method 'macro'.
So what exactly _is_ there? Do you know that particular line causes
(or noes not cause) the error?
Test::Unit::TestCase said the error was ~20 layers deeper - but
exactly below the same to_xml()
Phlip wrote:
Here's an error message. The details are not important (beyond to_xml
on a virtual AR database via fixture_dependencies). I know how to work
the actual problem.
NoMethodError in 'BlogMindMap should create XML'
undefined method `macro' for nil:NilClass
On Mar 4, 2009, at 12:16 PM, James Byrne wrote:
This is sort of off topic but it arose from a cucumber test failure
and
I am unsure how to address the underlying issue.
I spent yesterday tracking down an obscure error that was exposed by a
new cucumber test. It turned out to be an improper
On Feb 27, 2009, at 11:41 AM, Matt Wynne wrote:
On 26 Feb 2009, at 18:27, Scott Taylor wrote:
On Feb 26, 2009, at 1:19 PM, Forrest Chang wrote:
Hi all:
Is it possible to run Rails Cucumber spec in a different DB than
the test DB? I'd like to run the rspec and cucumber tests
On Feb 27, 2009, at 12:01 PM, Matt Wynne wrote:
On 27 Feb 2009, at 16:54, Scott Taylor wrote:
On Feb 27, 2009, at 11:41 AM, Matt Wynne wrote:
On 26 Feb 2009, at 18:27, Scott Taylor wrote:
On Feb 26, 2009, at 1:19 PM, Forrest Chang wrote:
Hi all:
Is it possible to run Rails
On Feb 26, 2009, at 1:19 PM, Forrest Chang wrote:
Hi all:
Is it possible to run Rails Cucumber spec in a different DB than the
test DB? I'd like to run the rspec and cucumber tests in parallel
in my cc.rb build, and as it is now, I get MYSQL deadlocks on
occasion. I could serialize
On Feb 13, 2009, at 10:52 AM, Nick Hoffman wrote:
On 12/02/2009, at 2:59 PM, David Chelimsky wrote:
On Feb 12, 2009, at 1:03 PM, Nick Hoffman n...@deadorange.com
wrote:
Does RSpec automatically call #valid? on ActiveRecord models?
For instance, when this example is run:
it 'should
Mark Wilden wrote:
It seems logical that #errors_on would call valid? Otherwise, how would it know?
That intuitively makes sense.
The reason the whole issue is confusing is because of AR's behaviour:
User.new.valid?
= false
User.new.errors.to_a
= []
errors_on(:foo) looks like it'll
On Feb 11, 2009, at 8:51 AM, Kaleem Ullah wrote:
Hi,
I am quite new to Rspec. I want to use Rspec to test my existing
Code. I
start from Models (Unit Testing). Here i want your help on a issue.
Here is model/user_spec.rb
describe User do
before(:each) do
@user=User.new
Jim Morris wrote:
Yet another way to do fixtures/factories is a hybrid that I outline in
my blog, its basically what I do.
http://blog.wolfman.com/posts/42
Basically I can't use the existing libraries as I am not using
ActiveRecord.
I'd be interested in supporting Datamapper, Sequel, and
or other, like in my case not using ActiveRecord.
So I came up with yet another way to do it, I think it is a hyvrid
between Fixtures and Factories.
outlined here...
http://blog.wolfman.com/posts/42
On Feb 7, 8:16 am, Jay Levitt lists-rs...@shopwatch.org wrote:
Scott Taylor wrote
Remi Gagnon wrote:
Hi,
I have a recursive method and I want to mock a var passed by ref.
Object.should_receive(:my_method).and_returnby_ref(@value)
Often a way to spec a recursive function is to alias it, and have the
recursive call call the alias. So if you want to check the recursion,
Juanma Cervera wrote:
Hello
I have seen that some people in this list is using Fixjour as the
replacement of fixtures.
But I can't understand why it is superior or better than other
approaches to the subject like Machinist o FactoryGirl.
What are the problems this library resolve?
Can somebody
On Feb 6, 2009, at 12:50 PM, Stephen Eley wrote:
On Fri, Feb 6, 2009 at 12:17 PM, Fernando Perez li...@ruby-
forum.com wrote:
The next big step will be specing controllers, as it is more painful
than models, but now that my controllers are ripped I guess it will
be
easier.
I've stopped.
Nat points out that problems with Object Mother arise when people
start adding factory methods to deal with the edge cases, such as
ObjectMother.new_invoice_with_no_postal_code. I totally agree that
this would be a problem since such abstraction results in hard to
follow tests (this is
John Kolokotronis wrote:
Hi all,
I'm new to Rspec but loving it so far and looking to use it as a
replacement for a Test::Unit framework I have which drives a web app
via Watir. So far, things have worked very well with Rspec but I can't
get my head around how before/after(:all) blocks would
On Feb 2, 2009, at 6:30 PM, Ben Greenberg wrote:
Hi all,
This spec always passes:
lambda do
process_card @credit_card, billing_info, 10604, '1.1.1.1',
@gateway
end.should raise_error(MinimalCart::CaptureFailureError) do |ex|
ex.should be_nil
ex.should_not be_nil
On Feb 2, 2009, at 6:30 PM, Ben Greenberg wrote:
Hi all,
This spec always passes:
lambda do
process_card @credit_card, billing_info, 10604, '1.1.1.1',
@gateway
end.should raise_error(MinimalCart::CaptureFailureError) do |ex|
ex.should be_nil
ex.should_not be_nil
What exactly is the difference between using controller.session and
session? I though that session was just a proxy controller.session,
but this irb/debug sessions show that it isn't:
http://gist.github.com/54673
When I call reset_session in the controller, I'm seeing the
controller's
On Jan 29, 2009, at 1:57 PM, Scott Taylor wrote:
What exactly is the difference between using controller.session and
session? I though that session was just a proxy controller.session,
but this irb/debug sessions show that it isn't:
http://gist.github.com/54673
When I call
On Jan 28, 2009, at 10:01 AM, Mike Gaffney wrote:
We actually have a machine that is a perfect clone of the production
machine. The only difference is the passwords. We test all
deployments to it first. We call it staging. Having a staging has 2
benefits:
1) We can test our deployment
On Jan 28, 2009, at 3:21 PM, Jeremy Lightsmith wrote:
So this is weird.
on my current project I've been working on speeding up specs, and I
just found that
time rake spec = 4m 0s
whereas
time rake spec:controllers spec:models spec:helpers spec:lib = 2m 32s
Do those rake tasks run rake
On Jan 28, 2009, at 4:49 PM, Tom Hoen wrote:
Zach Dennis wrote:
This will probably still break in webrat HEAD, I am using this branch
right now which includes a fix that is not in HEAD (it's waiting to
be
merged, or for another solution to take effect):
be a backup no more than 10 minutes old
And the backup should restore OK
And the restored database should contain the same records as
the
original database
On 27 Jan 2009, at 03:31, Scott Taylor wrote:
Does anyone have any insight into testing capistrano tasks? More
specifically, I'm
Does anyone have any insight into testing capistrano tasks? More
specifically, I'm looking to add regression tests to this package, which
adds database backup tasks to capistrano:
http://github.com/smtlaissezfaire/cap_db_dump/tree/master
Scott
Giuseppe Bertini wrote:
Hello there,
is anyone still using fixture_scenarios with RSpec these days? They
don't seem to coexist peacefully anymore.
I just created a new rails (2.2.2) app, generated an rspec_scaffold
(with v. 1.1.12), and verified that all specs pass.
But if I then install the
Matt Wynne wrote:
Sorry folks, because I know this has been asked before but I don't
remember anyone giving enough detail for me to sort this out the way I
want to.
How do I change my rake tasks to silently fail if they can't require
rspec?
I can do this:
begin
require
I'm getting the following error when trying to install rspec:
scott-taylors-macbook-pro:dl_forms(specs) smt$ sudo gem install rspec
Password:
ERROR: Error installing rspec:
invalid gem format for
/usr/local/ruby_versions/1_8_6/lib/ruby/gems/1.8/cache/rspec-1.1.12.gem
Are the gems no
1 - 100 of 381 matches
Mail list logo