use `bundle list` and `bundle show` to see what you have and
where did they come from. `script/rails g` should list the generators
you have, including the two Cucumber generators.
Bundler basics, see http://gembundler.com/rationale.html
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
ssion issue with views (as I regard them) is getting browsers to
render them right (enough). If somebody does (even partially)
automatized (even single browser) render testing, I'm all ears.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
__
2009-10-12 22:18, Tero Tilus:
> Expression x!=y is instead just syntactic sugar for !(x==y).
To illustrate how this affects #should, think of
'some string'.should != 'some string'
Now Ruby internals kick in and desugar this (before anything is even
executed) to
for
!(x==y).
> it "should fail but passes" do
> [].should != []
> 'some string'.should != 'some string'
> end
How about
it "fails now" do
[].should_not == []
'some string'.should_not == 'some string'
end
--
Tero Til
context?
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ceed? Comment the other
example one out and then try again. Generally you shouldn't expect
your examples (or specs) to run in any particular order.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
t;complete", I dare to ask if you do script/spec -b or something else?
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
steps to
reproduce?
> Please please please focus: Nobody is asking how to debug
We are trying. You did not tell you did debugging, so we told you
to try it, because it is usually the first step. Please, don't take
it personally that we might not all know you and your debug-fu. ;)
--
Tero
maybe I just suck at deduction. ;)
> Am I the first person in history to hit a programming error inside
> RSpec??
What makes you suspect you are?
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyfor
ptions are passed on correctly'
undefined method `find' for MyModel
And docs tell that (at least something really close to that one)
should work
http://rspec.info/documentation/mocks/partial_mocks.html
--
Tero Tilus ## 050 3635 235 ## h
2009-02-12 21:27, Mark Wilden:
> It seems logical that #errors_on would call valid? Otherwise, how
> would it know?
...and that's exactly what I thought too.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing
g that yourself from source is only one
click away if you you have dug yourself that deep in rspec-rails rdoc.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
2009-01-14 18:23, Sebastian W.:
> "interactive Cucumber" session similar to irb?
I can imagine it (when combined with Selenium) being not only cool,
but very useful tool when writing features. Kinda same way console is
useful when writing code.
--
Tero Tilus ## 050 363
2009-01-14 18:47, aslak hellesoy:
> What value vould it bring over plain old:
> cucumber features/scratchpad.feature:34
You gotta admit that at least the cool-factor would be pretty high. :)
--
Tero Tilus ## 050 3635 235 ## http://tero.til
ain
yourself to cry out "delta" without even thinking. ;)
Would this work for you?
big_decimal_variable.should be_close(123.23, 0.005)
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforg
idate"?
Could I git clone 1.1.12 somewhere? I'd love to do that.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
order they are defined and rake spec in reverse order. And that of
course makes ClassFoo.should have(:no).records fail when run _after_
examples that create ClassFoo instances (befause ive got transactions
off and the db state "bleeds" within one describe.
2009-01-07 16:11, Tero Tilus:
>
2009-01-07 23:23, Tero Tilus:
> 2009-01-07 13:08, David Chelimsky:
> > Is the app code opening transactions?
>
> Yes, but only one spot (iirc) which is not anywhere near the model
> whose test is failing here. I'll verify tomorrow that the failing
> test really d
2009-01-07 13:08, David Chelimsky:
> Is the app code opening transactions?
Yes, but only one spot (iirc) which is not anywhere near the model
whose test is failing here. I'll verify tomorrow that the failing
test really doesn't run the app code in question.
--
Tero Tilus ##
2009-01-07 13:04, Stephen Eley:
> config.use_transactional_fixtures in config.spec_helper.rb?
Tried true, false and commenting out. I could not see any difference.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing l
of course, what can I do about this...
A bit more stuff in pastie http://pastie.org/354521
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
2008-12-05 08:32, Jeff Talbot:
> I want to clear out the database after every run so my tests are
> isolated.
Maybe a minor detail, but I'd suggest you clear out the db _before_
each run.
--
Tero Tilus ## 050 3635 235 ## http://ter
2008-09-26 20:19, Jonathan Linowes:
> rake spec looks at the development environment to prepare the db
> schema, but still runs the specs in test
Looks like you're right. I haven't really had time to test this
though. I'll tell when I really know whats going on inside our
do.
Is this how it should go? Am I missing something? If there's
something broken in my rails app where should I start debugging?
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforg
2008-09-25 14:04, Nick Hoffman:
> I knew there was a dead simple answer to the question. Thanks, Tero.
> Apologies for the brain fart.
Np. Done the same quite a few times myself. ;)
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/kot
2008-09-25 13:47, Nick Hoffman:
> I'm calling #stub! and #should_receive on the same method within a
> class, and am finding that the method doesn't return the value given
> to #stub!
How about GMarker.should_receive(:new).with(foo).and_return mock_marker
--
Tero Ti
e in your tests and then go
debugging. That way you aren't actually using production data as test
data, but using it to develop the test data. And isn't that
(reproducing a crack in production env into tests) just what the
Laziness[1] is for too?
[1] http://agilewebdevelopment.com/p
database risks blurring the
> line between the well specified behaviour of your app and the pile
> of crap users inevitably fill it with. IMHO.
That's exactly why you should not test against production data.
However, could RSpec be handy tool to build a gadget to point out the
poop?
2008-08-30 17:02, Matt Wynne:
> RuBehave
Now _that's_ cool! I love it!
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
the motivation, I'm bound to hate it. ;)
> This is influenced from the joys of JavaScript.
It even looks like JavaScript. :D
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyfo
s not what Pat had in mind. Or was it?
And include_all_and_nothing_but is a bit verbose. :)
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ual_to
be_set_equal_to
Set equality is slightly (imo not fatally) incorrect, and multiset
might be alien to majority of hackers out there. I'd prefer either of
these or modifications.
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
__
2008-07-29 12:14, Luis Lavena:
> > Oh dear! You made my day. \o/
> that means it worked? :-)
Yes. :)
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://ruby
2008-07-29 11:59, Luis Lavena:
> Did you require rubygems first?
Oh dear! You made my day. \o/
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mail
/1.8/i386-linux", "."]
Now what? What would be a kosher way around this, maybe ln -s
something somewhere? I can see the issue being discussed though,
https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/145267
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero
ing
User.stub!(:find).and_return { ... calculate retval ... }
or
User.stub!(:find).and_return(@user, @user2)
see http://rspec.info/documentation/mocks/stubs.html
> Any ideas as to why this is not working? or better still how to get
> it working.
Uhh, no idea, sorry.
--
Tero
hen I write
> the specs?
Lucky you if you are able to do that. I've noticed I'm not.
--
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Wed, 19 Mar 2008, Joe Van Dyk wrote:
> do I have to manually clear out the database after a story runs?
I'm wondering the same, but with specs. Database gets dirty and
tests start to fail when i repeatedly do rake spec.
--
Tero Tilus ## +358 (0)50 3635 235 ## http://www.tilus.net/k
38 matches
Mail list logo