Re: [rspec-users] Controller specs and default_url_options

2012-01-19 Thread Martin C.
for my app. Hope this helps, Martin -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mocks and CL Programs

2011-04-05 Thread James Martin
On Mon, Apr 4, 2011 at 1:24 AM, andyl akl...@gmail.com wrote: I am using rspec/aruba to do integration tests of a command-line program i'm writing. ... Alternatively, I could write a local web service that delivers fake results. I like the idea of this for end-to-end tests, depending on

Re: [rspec-users] [module announcement] Equivalency testing for XML

2011-03-24 Thread James Martin
On Fri, Mar 25, 2011 at 3:59 AM, Michael B. Klein mbkl...@gmail.com wrote: Hello all, I recently released a gem that assists in testing XML nodes for equivalency, and thought it might be of interest to the RSpec community. It can normalize whitespace (or not), ignore element order (or not),

Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread James Martin
I understand you're looking for 'free' tutorials but I would really strongly advise you check out Michael Hartl's http://ruby.railstutorial.org/screencast series. I'm not affiliated with this in any way, but I watched them recently (more for the Rails 3 info than RSpec) and found the use of RSpec

Re: [rspec-users] Trying to test flash messaging with rspec

2011-03-10 Thread James Martin
How about just testing the flash directly, which should be accessible from your test: flash[:success].should =~ /welcome new user/i I've used a case insensitive regex here, which I think captures the intent of your test without being quite so rigid. What do you think? On Fri, Mar 11, 2011 at

[rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
I've recently been playing around with some code that re-runs a block until either the block returns a non-false value, or a timeout expires: https://gist.github.com/838520 At first, I thought this was working, as I was just checking the timing of the examples when returning a true value,

Re: [rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
Thanks, Michael: That's a useful article. I attempted to emulate the example in RSpec but still found that stubbing sleep with any of the built in rspec-mocks wasn't working the way I hoped. I was probably doing something wrong. In the end I wrote a little module (Sleepy) that I can include in

Re: [rspec-users] Controller Specs - undefined local variable or method 'app'

2011-02-12 Thread James Martin
Not 100% sure, but that failure looks suspiciously like something you get when using rack-test; which expects an 'app' method to be defined that returns an instance of your rack-compatible application. On Saturday, February 12, 2011, Doug Bryant doug+rspecu...@netinlet.com wrote: On one of my

Re: [rspec-users] Current test failing?

2011-02-11 Thread James Martin
I'm trying to imagine a use case (and usage) of this. Could you give me an example of how you would want to write it and what for? On Friday, February 11, 2011, Andrew Wagner wagner.and...@gmail.com wrote: Is there any way, within a test (e.g., in an after block), to see whether the test is

[rspec-users] Pull requests via Github - To Fork or Not? That is the Question.

2011-02-10 Thread James Martin
Hi, I've been coming up with some documentation examples, which I'd like to contribute as Cucumber features to go into the relishapp. I started following the contribute instructions on the rspec-dev README[1] but have a question about pull requests. Should I clone from the rspec/* projects on

Re: [rspec-users] Pull requests via Github - To Fork or Not? That is the Question.

2011-02-10 Thread James Martin
Thanks, David. That makes perfect sense. James. On Fri, Feb 11, 2011 at 1:05 PM, David Chelimsky dchelim...@gmail.com wrote: On Feb 10, 2011, at 6:29 PM, James Martin wrote: Hi, I've been coming up with some documentation examples, which I'd like to contribute as Cucumber features to go

[rspec-users] debugger in controller in rspec

2011-02-07 Thread Martin Streicher
I placed a debugger statement in a controller being tested with rspec2 to catch what's going on, but the statement is ignored? Do I have to do anything special to get the debugger to stop in the controller under rspec? If I place the debugger statement in the spec, I get a break -- but I want the

Re: [rspec-users] major release required?

2011-01-18 Thread Martin Hawkins
I agree with you that to create a major release for this too grand. Suitable fanfare and documentation is fine. On 18 January 2011 14:15, David Chelimsky dchelim...@gmail.com wrote: Hi all, Since the release of rspec-2.0, I've been following Rubygems' rational versioning [1] as closely as

Re: [rspec-users] Problem with 1.9.2

2010-12-06 Thread Martin Hawkins
I had this problem too. I am in a project that has 1.9.2 and a similar list of gems. I'm afraid I chickened out of using autotest and use watchr instead. On Dec 6, 9:49 pm, Nicholas Wieland nicholas.wiel...@gmail.com wrote: Hi guys, I'm not entirely sure this is a problem with RSpec or cucumber,

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
went wrong. Thanks for responding On Dec 4, 2:25 am, David Chelimsky dchelim...@gmail.com wrote: On Dec 3, 2010, at 11:07 AM, Martin Hawkins wrote: Ruby 1.9.2, Rails 3.0.3, Rspec-rails 2.2.0 I have: Factory.define :season_date do |f|  f.season_date Date.new(2011,9,24)  f.date_type

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
= ?, start_date]).first end end Agreed re redundant test - I put that in when the 'real' test failed. On Dec 4, 2:25 am, David Chelimsky dchelim...@gmail.com wrote: On Dec 3, 2010, at 11:07 AM, Martin Hawkins wrote: Ruby 1.9.2, Rails 3.0.3, Rspec-rails 2.2.0 I have: Factory.define

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
I can't believe I did that either... Doh! On Dec 4, 4:04 pm, David Chelimsky dchelim...@gmail.com wrote: On Sat, Dec 4, 2010 at 8:34 AM, Martin Hawkins martin.hawk...@gmail.com wrote: I can't believe I did that... No, there is only one Factory; copy and paste error. The SeasonDate class

[rspec-users] Speccing a model class method in Rails produces nil

2010-12-03 Thread Martin Hawkins
Ruby 1.9.2, Rails 3.0.3, Rspec-rails 2.2.0 I have: Factory.define :season_date do |f| f.season_date Date.new(2011,9,24) f.date_type season_start end RSpec.configure do |config| config.mock_with :rspec end Factory.define :season_date do |f| f.season_date Date.new(2011,9,24)

[rspec-users] Rspec2 and autotest

2010-12-03 Thread Martin Volerich
doesn't work with RSpec (although I may be wrong). Reverting to autotest 4.4.5 got me back up and running. What's the longer term strategy? watchr? Thanks Martin Volerich ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

[rspec-users] Problem testing Authlogic UserSession

2010-11-15 Thread Martin Hawkins
: undefined method `remote_ip' for nil:NilClass from /Users/martin/.rvm/gems/ruby-1.8.7-p...@pta3/gems/ activesupport-3.0.1/lib/active_support/whiny_nil.rb:48:in `method_missing' from /Users/martin/.rvm/gems/ruby-1.8.7-p...@pta3/gems/ authlogic-2.1.6/lib/authlogic/session/magic_columns.rb:61

Re: [rspec-users] RSpec-2.0.0 is released!

2010-10-11 Thread James Martin
Congrats on reaching this milestone and many thanks to all who contributed. Your efforts are much appreciated! RSpec2 is a massive improvement over 1 and I'm really enjoying using it. Thanks, James. On Sunday, October 10, 2010, David Chelimsky dchelim...@gmail.com wrote: ## RSpec-2.0.0 has been

[rspec-users] Newbie : How to spec params hash amendment

2010-07-30 Thread Martin Hawkins
I am new to rspec and am finding it all a bit daunting at the moment. I'd like to be able to adopt a bdd approach to my development but I'm still at the stage of trying to get my head around rspec concepts so I'm committing the cardinal sin of coding first and then writing tests. I am using the

Re: [rspec-users] testing against a live environment

2010-04-30 Thread Martin DeMello
perfect :) martin On Thu, Apr 29, 2010 at 8:10 PM, Joaquin Rivera Padron joahk...@gmail.com wrote: maybe then check http://github.com/cavalle/steak joaquin 2010/4/29 Martin DeMello martindeme...@gmail.com On Tue, Apr 27, 2010 at 3:32 PM, Matt Wynne m...@mattwynne.net wrote: Should

Re: [rspec-users] testing against a live environment

2010-04-29 Thread Martin DeMello
it in English. martin ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] testing against a live environment

2010-04-29 Thread Martin DeMello
On Wed, Apr 28, 2010 at 10:20 PM, Matthew Van Horn mattvanh...@gmail.com wrote: I've been using rspec with webrat, for exactly this sort of thing, as detailed here: http://blog.veez.us/2009/09/11/integration-testing-without-cucumber Thanks! martin

[rspec-users] testing against a live environment

2010-04-27 Thread Martin DeMello
to organise the tests. Is it likely to be useful, or am I going against the grain enough that I'd run into problems? martin ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] spork doesn't find helpers

2009-11-27 Thread Martin
/simpler_helper.rb. Running rake spec without spork works correctly. Can you point me the right direction please? Thanks, Martin ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spork doesn't find helpers

2009-11-27 Thread Martin
10: td%=h item.name %/td But 'simpeFunction' is defined in app/helpers/simpler_helper.rb. Running rake spec without spork works correctly. Can you point me the right direction please? Thanks, Martin ___ rspec-users mailing list rspec-users

[rspec-users] should_yield (is it needed?)

2009-11-06 Thread Martin Emde
on whether this is worth making into a patch. Martin Emde Tw: @martinemde ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Incompatible version?

2009-09-21 Thread Jorge Martin
with: rspec (1.2.8, 1.1.12) rails (2.3.3, 2.3.2) rspec-rails (1.2.7.1, 1.1.12) cucumber (0.3.101, 0.3.100, 0.3.93, 0.3.92) and running the last selenium client it works -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing

[rspec-users] Incompatible version?

2009-09-18 Thread Jorge Martin
I'm trying to use Rspe but I have this message error: undefined method `evaluate_value_proc' for class `Spec::Matchers::Change' (NameError) ___ I have this gems: rspec 1.2.8, 1.1.12 rspec-rails 2.3.7.2, 2.2.12 cucumber0.3.101, 0.3.100

Re: [rspec-users] Cucmber: Mysql::Error: query: not connected: ROLLBACK

2009-04-20 Thread Martin
Hi Aslkak, Did you change your test.rb to use config.cache_classes = false ? you're right, I changed it because of rspec-server. Now I found the hint on http://wiki.github.com/dchelimsky/rspec/spec_server-autospec-nearly-pure-bdd-joy that it breaks cucumber... Thanks, Martin

[rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Martin
? Thank you, Martin ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] rspec tests and acts_as_solr models

2008-09-23 Thread Martin Streicher
configuration works properly.) Can anyone make suggestions on how to best approach this? Shall I just open the class and redefine certain methods? Or is there a way for me to disable Solr for all classes while running rspec? Martin ___ rspec

Re: [rspec-users] Newbies are people too

2008-09-18 Thread Martin Streicher
Thanks, Scott. I tend to want to run the real thing to make sure the code really does work. On Sep 17, 2008, at 10:59 AM, [EMAIL PROTECTED] wrote: Ultimately, it's all about how comfortable you feel. Mocks will always smell bad with rails' associations because of the law of demeter

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Martin Streicher
with rspec tests? Martin On Sep 16, 2008, at 3:41 PM, [EMAIL PROTECTED] wrote: require 'ruby-debug' debugger at the point in my code where I want to break into the debugger. Then running the specs via most any means (including autotest, but not spec_server) will start up the debugger

Re: [rspec-users] The distinctive smell of newbiness

2008-09-17 Thread Martin Streicher
The heart of my question is the seemingly chicken-and-egg-like nature of testing many models that work together. I now have two flavors of tests: tests that keep the models honest (computations and returns values are consistent and accurate) and tests that operate at the macro level as

Re: [rspec-users] Newbiness

2008-09-17 Thread Martin Streicher
Hey, James. Nice to hear from you. If you hear of any work, send it my way. I did watch the PeepCode stuff. I will watch it again now that I have a little experience with the whole thing -- perhaps it will fill in some blanks. On Sep 17, 2008, at 2:13 PM, [EMAIL PROTECTED] wrote:

[rspec-users] Prepare for newbie-ness

2008-09-16 Thread Martin Streicher
? Martin ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Any news on the rSpec books?

2008-08-15 Thread Martin Bernd Schmeil
Any news on this? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Netbeans and .story files

2008-04-07 Thread Martin Krauskopf
Tim Haines wrote: Hi Ashley, I don't think Netbeans has support for plain text stories yet - but I'm not certain (I was using it with frustration last night too). Probably better to ask in the netbeans forum? Hi, yes, the .story extension is not supported out-of-the box. Unfortunately