Re: [rspec-users] cucumber generator error in rails 3

2010-09-27 Thread Tero Tilus
have, including the two Cucumber generators. Bundler basics, see http://gembundler.com/rationale.html -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo

Re: [rspec-users] Good practices on spec'ing views?

2010-05-01 Thread Tero Tilus
(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/ ___ rspec-users mailing list

Re: [rspec-users] should and != operator

2009-10-12 Thread Tero Tilus
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 !('some string'.should

Re: [rspec-users] [RSpec, Rails] POST create action spec and before_filter

2009-05-19 Thread Tero Tilus
(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

Re: [rspec-users] [RSpec, Rails] POST create action spec and before_filter

2009-05-19 Thread Tero Tilus
? -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] what has RSpec got against stack traces?

2009-03-07 Thread Tero Tilus
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@rubyforge.org http://rubyforge.org

Re: [rspec-users] what has RSpec got against stack traces?

2009-03-07 Thread Tero Tilus
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 Tilus ## 050 3635 235

Re: [rspec-users] what has RSpec got against stack traces?

2009-03-07 Thread Tero Tilus
/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

[rspec-users] ActiveRecord::Base.should_receive(:find) fails

2009-02-19 Thread Tero Tilus
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 ## http://tero.tilus.net

Re: [rspec-users] Is #valid? automatically called?

2009-02-12 Thread Tero Tilus
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

Re: [rspec-users] Is #valid? automatically called?

2009-02-12 Thread Tero Tilus
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 list rspec

Re: [rspec-users] IRB-like utility for Cucumber?

2009-01-14 Thread Tero Tilus
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.tilus.net

Re: [rspec-users] IRB-like utility for Cucumber?

2009-01-14 Thread Tero Tilus
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 3635 235 ## http

Re: [rspec-users] Why can not a BigDecimal be compared to a Float via ==. How should I handle this???

2009-01-11 Thread Tero Tilus
. ;) 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@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Examples not getting rolled back...

2009-01-09 Thread Tero Tilus
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

Re: [rspec-users] Examples not getting rolled back...

2009-01-08 Thread Tero Tilus
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: I'm keep getting the following kind of pattern in my logs

Re: [rspec-users] Examples not getting rolled back...

2009-01-07 Thread 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 list

Re: [rspec-users] Examples not getting rolled back...

2009-01-07 Thread 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 doesn't run the app code in question. -- Tero Tilus ## 050 3635 235 ## http

Re: [rspec-users] Database.truncate_all

2008-12-07 Thread Tero Tilus
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://tero.tilus.net/ ___ rspec

[rspec-users] rake spec defaults to devel env

2008-09-26 Thread Tero Tilus
it to 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@rubyforge.org

Re: [rspec-users] #stub! and #should_receive on the same method

2008-09-25 Thread Tero Tilus
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 Tilus ## 050 3635 235 ## http

Re: [rspec-users] #stub! and #should_receive on the same method

2008-09-25 Thread Tero Tilus
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/koti/tero

Re: [rspec-users] scenarios on production data

2008-09-08 Thread Tero Tilus
. 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/plugins/laziness -- Tero Tilus ## 050 3635 235 ## http

Re: [rspec-users] WDYT, simple, anonymous story listeners?

2008-08-12 Thread Tero Tilus
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@rubyforge.org http://rubyforge.org/mailman/listinfo

Re: [rspec-users] Someone please name this matcher for me

2008-08-06 Thread Tero Tilus
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

Re: [rspec-users] $LOAD_PATH problem when creating rake task

2008-07-29 Thread Tero Tilus
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/mailman

[rspec-users] $LOAD_PATH problem when creating rake task

2008-07-29 Thread Tero Tilus
being discussed though, https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/145267 -- 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

Re: [rspec-users] Rspec - stubbing same class multiple times with different co

2008-07-22 Thread Tero Tilus
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 Tilus ## 050 3635 235

Re: [rspec-users] BDD/Rails/Shoulda

2008-05-01 Thread Tero Tilus
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

Re: [rspec-users] cleaning up after stories

2008-03-19 Thread Tero Tilus
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/koti/tero