Re: [rspec-users] polymorphic controller testing

2009-08-26 Thread Rick DeNatale
x27; > from script/spec:5 > ## Didn't you mean SchedulesController instead of MeetingsController in the spec. >From the snippet from your routes.rb I wouldn't expect you to have a MeetingsController. And controller specs don't

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Rick DeNatale
gt;>>>>> has anybody experienced this problem before? I'm using rspec and >>>>>>> rspec-rails at version 1.2.6, with Rails 2.3.2, while customizing >>>>>>> Spree 0.8.99 >>>>>> >>>>>> Please run this spec f

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Rick DeNatale
tempted to run the spec under rdebug, put a breakpoint before the stub! call and step into it to see what's going on. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http:

Re: [rspec-users] Using ActiveRecord without Rails

2009-09-01 Thread Rick DeNatale
under OS X, using passenger and apache, but I've done similar things on a linux development machine before. On OS X, the passenger preference pane makes this dead easy, and passenger runs the rails app on demand, and shuts it down when it's been idle. -- Rick DeNatale Blog: http://t

[rspec-users] Is there a good (non-judgemental) comparison of Rspec mocking vs Mocha?

2009-10-03 Thread Rick DeNatale
there must be a comparison/conversion chart somewhere, like the Test:Unit => RSpec translation guide in the RSpec docs, but my usually awesome google skills seem to be failing me on this. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/Rick

[rspec-users] Anyone using the rspec textmate bundle with Ruby 1.9.1

2009-10-23 Thread Rick DeNatale
I'm now in the process of facing converting a rails app to use Ruby 1.9.1. Has anyone figured out how to use 1.9 with the RSpec bundle in textmate and preferably how to switch back and forth? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeN

Re: [rspec-users] surprising...

2009-11-30 Thread Rick DeNatale
to all Ruby objects, just Kernel#should and Kernel#should_not and that's it. I guess that's the decoupling you're talking about. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-ri

Re: [rspec-users] Rspec - Creation of stories

2009-12-03 Thread Rick DeNatale
it is probably via the RSpec book which is currently under development and covers both RSpec and Cucumber. Although it's pre-production, it's available under the Pragmatic Programmers beta program. http://pragprog.com/titles/achbd/the-rspec-book -- Rick DeNatale Blog: http://talkli

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rick DeNatale
m, which is about as "bread and butter" Ruby as you can get, > readable to anybody who's ever read the first chapter of a Ruby book. I think that the english text is secondary to doing something which doesn't require mixing another method or methods into all objects. In the ear

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rick DeNatale
=> 'admin'> was I like Pat's idea too, but [x, y, z].should_not all_be_allowed_to(...) doesn't seem to be the same thing as none_of(x, y, z).should be_allowed_to(...) maybe [x, y, z].should all_not_be_alllowed_to(...) but I'm not sure -- Rick DeNa

Re: [rspec-users] class variables different between spec and runtime?

2009-12-22 Thread Rick DeNatale
ich sets instance >> variables on the User class. >> The user in the console comes from find(), and those ivars are not yet >> set. > > Also - @params in the User class (in the class methods) is not the same > @params in the User instances (in update_

Re: [rspec-users] concept of given

2009-12-22 Thread Rick DeNatale
or yet another synonym for describe or context. In which case I'd suggest just using describe or context as in: context "given a certain set of paths" do before(:each) do # code to set up the paths however the included specs need them, e.g. @paths = ["a/b", "c/d

Re: [rspec-users] class variables different between spec and runtime?

2009-12-28 Thread Rick DeNatale
On Mon, Dec 28, 2009 at 12:18 AM, Andrew Premdas wrote: > 2009/12/22 Rick DeNatale > Please explain why - thanks. Because, classes and class variables aren't guaranteed to be persistent. In development mode, classes can get reloaded, which wipes out class (and class instance) var

Re: [rspec-users] rake spec seems to not clean the database after failing specs

2009-12-28 Thread Rick DeNatale
rather than cleaning up afterwards. Why? Because it's easier to debug failures if you preserve the evidence. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com

Re: [rspec-users] more verbosity for be_an?

2010-01-02 Thread Rick DeNatale
ing >> is that the object exists, responds to certain messages and gives certain >> values back for those messages. Thinking about types is so Java, C++ :-) > > Generally speaking, you're correct, but there are cases where this is > valuable - like if you're spec

Re: [rspec-users] 'Expected NoMethodError, got NameError'

2010-01-05 Thread Rick DeNatale
ppreciation is always appreciated :) I can appreciate that! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedi

Re: [rspec-users] more verbosity for be_an?

2010-01-09 Thread Rick DeNatale
y wanted 1.should be_a FixNum instead of 1.class.should be_a Fixnum -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale ___

Re: [rspec-users] default to just call the method?

2010-01-14 Thread Rick DeNatale
nclude("1:4") which is clearer IMHO. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale __

[rspec-users] Can I set an expectation that a method invokes super?

2010-01-28 Thread Rick DeNatale
gress, but my imagination is failing me as to how to do it. Any ideas? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/ri

Re: [rspec-users] somewhat confused by the help instructions...

2010-01-31 Thread Rick DeNatale
h the describe groups as well? I would like to be able to run > all of the examples in either "first group" or "second group". Will it > match? Also, does anyone but me find the expectation in the case where there's no match surprising? -- Rick DeNatale Blog

Re: [rspec-users] somewhat confused by the help instructions...

2010-02-01 Thread Rick DeNatale
tar! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale ___ rspec-users mailing list rspec-users

Re: [rspec-users] Best practices to managing RSpec code for very large projects?

2010-02-04 Thread Rick DeNatale
e increase of entropy. It may seem hard, but remember the more you fight it the more you delay the heat death of the universe! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale Linke

Re: [rspec-users] Question About Cleaning Up Specs?

2010-02-19 Thread Rick DeNatale
would want to prove that you were finding the right user in this case, although I'd guess in most conventional rails apps these days you'd actually stub the controllers current_user method to return @user rather than stubbing User.find -- Rick DeNatale Blog: http://talklikeaduck.denhav

[rspec-users] Of ActiveRecord, arel, and train wrecks

2010-02-22 Thread Rick DeNatale
bbing difficult among other things. Thoughts? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale

Re: [rspec-users] Of ActiveRecord, arel, and train wrecks

2010-02-22 Thread Rick DeNatale
tend to do, is to not use chained scopes in controllers, but define model methods which use them, which allows for stubbing/mocking those methods, and keeps the train wrecks isolated. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickD

Re: [rspec-users] RSpec-2 and The RSpec Book

2010-03-02 Thread Rick DeNatale
e software. I guess that the current beta PDF will serve as the best checkpoint for RSpec 1 and Rails 2.x. I guess it's time to print a personal hard-copy. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwit

Re: [rspec-users] rspec-2 update

2010-03-04 Thread Rick DeNatale
s > http://github.com/rspec-rails I think those should be: http://github.com/rspec/rspec http://github.com/rspec/rspec-core http://github.com/rspec/rspec-dev http://github.com/rspec/rspec-expectations http://github.com/rspec/rspec-mocks http://github.com/rspec/rspec-rails -- Rick DeNa

[rspec-users] Anyone used RSpec to write specs for rake tasks?

2010-04-19 Thread Rick DeNatale
some kind of testing harness for Rake tasks with RSpec. I tried googling but kept coming up with stuff about using the rake tasks provided by RSpec. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwit

Re: [rspec-users] File creation

2010-04-25 Thread Rick DeNatale
a separate method which takes the IO object as a parameter, and test that method passing in a StringIO. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-

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

2010-04-30 Thread Rick DeNatale
Views tend to change a lot as the UI of an application evolves, so specs tend to be brittle. If views have a lot of logic, that's a code smell. In rails such behavior belongs in either the controller, or a helper, and that's where I invest my spec efforts. -- Rick DeNatale Blog: http:/

Re: [rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread Rick DeNatale
ailure is a bit confusing, but the argument list to the with method should look like the argument list to the expected method. The expectation here is that find should get one argument, an array with a symbol and a hash, rather than two parameters, a symbol and a hash. It would be better if t

Re: [rspec-users] RSpec newb - why is my negative test not passing?

2010-05-08 Thread Rick DeNatale
ld_receive(:get).with(url).and_raise(exception_new) >    lambda {TinyUrlService.make_tiny(url)}.should raise_exception >  end > end -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://w

Re: [rspec-users] How do I isolation test against different gem versions?

2010-05-23 Thread Rick DeNatale
the auxiliary files use the gem directive to specify a particular version of active_record. Have a look at http://github.com/rubyredrick/ri_cal/tree/master/tasks/ Particularly spec.rake and the files in the gem_loader sub directory. HTH -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.

Re: [rspec-users] Rails 3 Support/Design

2010-06-11 Thread Rick DeNatale
stuff you need from rspec-rails in the development environment into a separate rspec-rails-dev gem or something like that. Breaking up gems seems to have been a theme in the transition from Rails 2 -> Rails 3. Just an idea -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://git

Re: [rspec-users] Rspec 2 (beta.11) view spec haml

2010-06-11 Thread Rick DeNatale
o rather than describe "user_sessions/new.html.haml" do -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http:

Re: [rspec-users] Rails 3 Support/Design

2010-06-11 Thread Rick DeNatale
On Fri, Jun 11, 2010 at 11:17 AM, David Chelimsky wrote: > On Jun 11, 2010, at 10:56 AM, Rick DeNatale wrote: > >> On Thu, Jun 10, 2010 at 4:10 PM, David Chelimsky >> wrote: >>> On Thu, Jun 10, 2010 at 3:14 PM, geetarista wrote: >>>> Since Rspec-Rails

Re: [rspec-users] rspec-rails 2 webrat dependency

2010-06-19 Thread Rick DeNatale
ndencies. I have a similar issue with the RiCal gem. It works with either the activesupport OR tzinfo gems, rather than require either I just document that it requires one or the other and leave it up to the user. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://git

[rspec-users] Quickie blog article about dealing with Bundler, RSpec and Rake

2010-06-25 Thread Rick DeNatale
http://talklikeaduck.denhaven2.com/2010/06/25/making-rspec-rake-and-bundler-play-well-together Note this is for Rails 2.3, not sure if Rails 3 and Rspec 2 would be different. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale

Re: [rspec-users] set expectation using self in constructor?

2010-07-14 Thread Rick DeNatale
ge this to spec the results rather than the implementation: e.g. foo = Foo.new foo.bar.should == foo Assuming that foo and bar have public accessors for bar and foo respectively. If not you can use instance_variable_get to 'get' around that. HTH -- Rick DeNatale Blog: http:

Re: [rspec-users] [RSpec] Dynamic reloading with Object.send(:remove_const)

2010-08-04 Thread Rick DeNatale
efineFoo foo2 = Foo.new foo2.methods - Object.instance_methods # => ["m1"] foo.methods - Object.instance_methods # => ["m1", "m2"] foo.class == foo2.class # => false -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick

Re: [rspec-users] [RSpec] Dynamic reloading with Object.send(:remove_const)

2010-08-05 Thread Rick DeNatale
On Thu, Aug 5, 2010 at 5:16 AM, Bruno Cardoso wrote: > Rick Denatale wrote: >> Your pastie says >> # this should have made "Account" go back to its original state but >> it's not working. >> # this works outside of RSpec. >> >> but I don

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-08 Thread Rick DeNatale
delimiter matching etc. and the cost of having a separate language definition in the RSpec bundle in terms of confusion and or maintenance probably isn't worth it. For more about how textmate detects file times see: http://blog.macromates.com/2007/file-type-detection-rspec-r

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-09 Thread Rick DeNatale
le doesn't have a language definition since rspec files are really ruby files and want to use that language definition. I guess I just don't see what's wrong with using the convention of naming spec files with the suffix _spec.rb as Mr. Textmate suggests http://blog.macromates.co

Re: [rspec-users] Order guarantees of let

2010-08-09 Thread Rick DeNatale
t via google or the latest draft of the book. Second, unless let! is a new method which not only defines the memoized method but invokes it, then the order of evaluation will depend on the order the generated let methods are invoked in the example won't it? -- Rick DeNatale Blog: ht

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-09 Thread Rick DeNatale
On Mon, Aug 9, 2010 at 11:23 AM, David Chelimsky wrote: > > On Aug 9, 2010, at 9:56 AM, Rick DeNatale wrote: > >> On Sun, Aug 8, 2010 at 11:45 PM, Elliot Winkler >> wrote: >>> On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe >>> wrote: >>>> >

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-10 Thread Rick DeNatale
On Tue, Aug 10, 2010 at 9:40 AM, Ashley Moran wrote: > > On 9 Aug 2010, at 17:37, Rick DeNatale wrote: > >> Well, I'd still use a different file name suffix which I could set >> textmate to recognize as a spec >> >> _sspec.rb or _sgroup.rb >> >>

Re: [rspec-users] Order guarantees of let

2010-08-10 Thread Rick DeNatale
it not (going to be) mentioned in the book, it doesn't seem to be in Beta 15.0 supposedly the final beta version. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/pe

Re: [rspec-users] Monitor method invoking from superclass

2010-09-30 Thread Rick DeNatale
;s reply, I don't think you should, Lei. What you really should be testing that the observable effects of the call are 'as if' the super call were made. If you could test that the super call was made it would be testing that the implementation were a certain way more

Re: [rspec-users] Monitor method invoking from superclass

2010-09-30 Thread Rick DeNatale
On Thu, Sep 30, 2010 at 10:36 AM, Zhi-Qiang Lei wrote: > > On Sep 30, 2010, at 9:56 PM, Rick DeNatale wrote: > >> What you really should be testing that the observable effects of the >> call are 'as if' the super call were made. >> >> If you could te

Re: [rspec-users] DateTime.now.utc in fixtures

2010-10-12 Thread Rick DeNatale
-flies-while-youre-having-fun-testing More recently I've been using timecop http://github.com/jtrupiano/timecop It allows time to be either frozen or offset, and it stubs Time, DateTime and Date to do the right thing. -- Rick DeNatale Help fund my talk at Ruby Conf 2010:http://pledgie.co

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

2010-10-12 Thread Rick DeNatale
uby Conf next month. http://www.youtube.com/v/kEaB-Di89S8 -- Rick DeNatale Help fund my talk at Ruby Conf 2010:http://pledgie.com/campaigns/13677 Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-ric

Re: [rspec-users] Testing attr_accessible (and/or attr_protected)

2010-11-02 Thread Rick DeNatale
And as Wincent points out, you don't usually need to do such plumbing yourself, there are lots of RSpec compatible matchers (including the Shoulda matchers) freely available. -- Rick DeNatale Help fund my talk at Ruby Conf 2010:http://pledgie.com/campaigns/13677 Blog: http://talklikeaduck.

Re: [rspec-users] Problems running RSpec 2 with autotest/autospec

2010-12-10 Thread Rick DeNatale
pec-problem.jpg > > Again, any suggestions on how to get this working would really be > appreciated. > > Michelle > > -- > Posted via http://www.ruby-forum.com/. > ___ > rspec-users mailing list > rspec-users@rubyforge.o

Re: [rspec-users] major release required?

2011-01-18 Thread Rick DeNatale
in lib/autotest/rspec2.rb def using_bundler? File.exists?('./Gemfile') && !defined Autotest::Bundler # and also check for the option if you decide to do #1 end -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/ru

Re: [rspec-users] major release required?

2011-01-19 Thread Rick DeNatale
On Tue, Jan 18, 2011 at 1:31 PM, David Chelimsky wrote: > > On Jan 18, 2011, at 11:08 AM, Rick DeNatale wrote: > >> On Tue, Jan 18, 2011 at 9:15 AM, David Chelimsky >> wrote: >>> Hi all, >>> >>> Since the release of rspec-2.0, I've bee

Re: [rspec-users] major release required?

2011-01-22 Thread Rick DeNatale
> anything, and you'll see a message saying so. At that point, you > either use the autotest/bundler plugin or not. > > Thoughts? That sounds reasonably pragmatic to me. Of course I've only had two sips of coffee this morning. -- Rick DeNatale Blog: http://talklikeaduck.d

Re: [rspec-users] Difference between :each and :all

2011-01-27 Thread Rick DeNatale
meaning of before(:all) for some people, after(:any) to me evokes the curent meaning of after(:each) more than it does after(:all), i.e. after any OF the examples rather than after all the examples, because I'd never say after any the examples. But that might just be me. -- Rick DeNat

Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread Rick DeNatale
On Sun, Jan 30, 2011 at 9:09 AM, David Chelimsky wrote: > You can either use mock_model or mock_stub David, Did you mean to say stub_model rather than mock_stub? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Rick DeNatale
o include the location > information so you can get right to the example if you need to: > > RSpec.configure do |c| >  c.after do |m| >   Rails.logger.debug "=== ^^ #{m.example.full_description} ^^ ===" >   Rails.logger.debug "=== ^^ #{m.example.location} ^^ ===" &

Re: [rspec-users] Possible to ask rspec to show more code in the debugger?

2011-02-03 Thread Rick DeNatale
rc file in your home directory set listsize 12 in that file should set the default number of lines for the list command to show, perhaps that file changed. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://

Re: [rspec-users] difference between validate and validate_on_create

2011-04-28 Thread Rick DeNatale
eated. http://guides.rubyonrails.org/active_record_validations_callbacks.html#creating-custom-validation-methods -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: h

Re: [rspec-users] !~ seems to not work

2011-07-29 Thread Rick DeNatale
r is trying to transpose the characters to ~! which is syntactically incorrect sugar. Although this might be a typo in the post. → irb >> 'abc' !~ /def/ => true >> 'abc' ~! /def/ SyntaxError: compile error (irb):2: syntax error, unexpected '~&#

Re: [rspec-users] !~ seems to not work

2011-07-29 Thread Rick DeNatale
On Fri, Jul 29, 2011 at 7:59 AM, David Chelimsky wrote: > Thanks for setting things straight. Just happy to be here sir! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9

Re: [rspec-users] Caboosers drop RSpec

2008-11-05 Thread Rick DeNatale
My 2 cents http://talklikeaduck.denhaven2.com/articles/2008/11/05/the-rspec-caboo-se-brouhaha -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

[rspec-users] autospec broken - non-rails project

2008-11-25 Thread Rick DeNatale
be' error. I'm sure that it's some configuration error, but so far googling has not brought any joy. Any help appreciated. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ ___ rspec-users mailing list rspec-users

Re: [rspec-users] attributes method not working?

2008-11-27 Thread Rick DeNatale
; > @adtag.should_not be_valid > And since it's the valid? call which sets the errors, even if you address the problems pointed out by David, those errors expectations won't be met if you do things in this order. -- Rick DeNatale My blog on Ruby http://talklikeaduck

[rspec-users] Setup for autospec for non-rails project

2008-12-02 Thread Rick DeNatale
ne lots of googling about this, and everything about running autotest for RSpec for non-rails projects seems to be quite old. I did find one old post which recommended making a .autotest file in the project with mappings based on the rspec-rails mappings, which is what I tried above, but no joy. Any in

Re: [rspec-users] Setup for autospec for non-rails project

2008-12-02 Thread Rick DeNatale
On Tue, Dec 2, 2008 at 12:12 PM, Mark Wilden <[EMAIL PROTECTED]> wrote: > On Tue, Dec 2, 2008 at 9:01 AM, Rick DeNatale <[EMAIL PROTECTED]>wrote: > > >> $ autospec >> loading autotest/rspec >> /opt/local/bin/ruby -S spec/lib/v_date_time_property_spec.rb &

Re: [rspec-users] Setup for autospec for non-rails project

2008-12-02 Thread Rick DeNatale
od defined in the rspec gem in lib/autotest/rspec.rb def make_test_cmd(files_to_test) return '' if files_to_test.empty? return "#{ruby} -S #{files_to_test.keys.flatten.join(' ')} #{add_options_if_present}" end I guess I need to file a bug report?!? -- R

Re: [rspec-users] Setup for autospec for non-rails project

2008-12-02 Thread Rick DeNatale
On Tue, Dec 2, 2008 at 1:18 PM, Rick DeNatale <[EMAIL PROTECTED]>wrote: > Okay, > > If I add this to my .autospec file > > class Autotest::Rspec > > def make_test_cmd(files_to_test) > return '' if files_to_test.empty? > ret

Re: [rspec-users] class << self considered harmful... really?

2008-12-04 Thread Rick DeNatale
On Thu, Dec 4, 2008 at 1:04 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > 'look at me, ma, I'm opening the eigenclass!' > > "Honey, if you're going to open your eigenclass, do it in your room." > And if you keep doing it, you'll go blind!

Re: [rspec-users] understanding "within"

2008-12-23 Thread Rick DeNatale
w.w3.org/TR/CSS2/selector.html#q2 This might also be of help http://reference.sitepoint.com/css/understandingnthchildexpressions -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RubyRedRick ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2009-01-11 Thread Rick DeNatale
ls which cannot. 2. As is the case in decimal fractions, where some rational numbers such as 1/3 cannot be represented without an infinite number of decimal digits, there are similar values dependent on the base used for the float representation. There's a whole branch of computer science, Num

Re: [rspec-users] OK... What is ... fu ?

2009-01-30 Thread Rick DeNatale
ourse according to the last meaning of Fu in that article*, the technical meaning of Fu is Fu is having the ability to run Windows applications on Linux or OS X. * "Fu is having wine" -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatal

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-30 Thread Rick DeNatale
rompted me to make yet another suggestion http://gist.github.com/55165 -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-30 Thread Rick DeNatale
On Fri, Jan 30, 2009 at 1:36 PM, David Chelimsky wrote: > On Fri, Jan 30, 2009 at 12:00 PM, Rick DeNatale > wrote: > > On Thu, Jan 29, 2009 at 7:33 PM, David Chelimsky > > wrote: > >> > >> > I agree this discussion should move to a ticket. But it seems I a

[rspec-users] An Update for my "Fan"

2009-03-15 Thread Rick DeNatale
the latest articles and comments, but I wanted to let anyone who was interested, if such a person exists, what was up. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn:

Re: [rspec-users] Problem spec'ing ActionMailer with attachment, body not getting rendered.

2009-03-18 Thread Rick DeNatale
On Wed, Mar 18, 2009 at 4:28 PM, Rick DeNatale wrote: > I've got a simple ActionMailer::Base subclass: > class InfoMailer < ActionMailer::Base > > def info(user, zip_name) > recipients user.email > subject "Requested Info" > attac

[rspec-users] Problem spec'ing ActionMailer with attachment, body not getting rendered.

2009-03-18 Thread Rick DeNatale
; FAILED expected: "", got: "Attachment: xyz.zip\n" (using ==) It's looking like the mail template never got rendered, and body is giving me the attachment since it's the only part. I've got one other mailer method in that mailer which

[rspec-users] RSpec style and truthiness

2009-03-19 Thread Rick DeNatale
should that be non-truthy) value. Even 'should be' is a bit grating. I'm tempted to write a pair of matchers like be_truthy and be_falsy, but I was wondering what other RSpec users have to say. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/

Re: [rspec-users] RSpec style and truthiness

2009-03-20 Thread Rick DeNatale
On Thu, Mar 19, 2009 at 11:20 PM, Stephen Eley wrote: > 2009/3/19 Rick DeNatale : > > Even 'should be' is a bit grating. I'm tempted to write a pair of > matchers > > like be_truthy and be_falsy, but I was wondering what other RSpec users > have > > to

Re: [rspec-users] Problem spec'ing ActionMailer with attachment, body not getting rendered.

2009-03-21 Thread Rick DeNatale
On Fri, Mar 20, 2009 at 11:46 AM, Zach Dennis wrote: > On Fri, Mar 20, 2009 at 11:11 AM, Zach Dennis > wrote: > > 2009/3/18 Rick DeNatale : > >> I've got a simple ActionMailer::Base subclass: > >> class InfoMailer < ActionMailer::Base > >> > &

Re: [rspec-users] Reuse of Cucumber Features

2009-04-09 Thread Rick DeNatale
ot of time debugging your steps to convince yourself that "the flight on the second day" maps to "another flight leaving on the following day" when you reuse the steps in other cases. I found myself wanting to do meta bdd on my story code! -- Rick DeNatale Blog: http://talklikeadu

[rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-26 Thread Rick DeNatale
ame.feature --format=html false Cucumber runs fine from bash. Am I missing some setup? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.lin

Re: [rspec-users] RSPEC book example in Chapter 3.

2009-04-27 Thread Rick DeNatale
GP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkn0x+cACgkQf3s7GyRXBzRe1QCeJgBAk6jJX4xinYTZYyQ05ngm > aGUAn1hU6grPNIXgoTYAW4t79a1qjOdq > =cn4o > -END PGP SIGNATURE- > > ___ > rspec-users mailing list >

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Rick DeNatale
On Mon, Apr 27, 2009 at 8:13 AM, Rick DeNatale wrote: > On Sun, Apr 26, 2009 at 11:38 PM, Ben Mabey wrote: >> Rick DeNatale wrote: >>> >>> I finally plunked down for the beta RSpec bundle and I'm working >>> through the initial example.  Although I&#

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Rick DeNatale
On Sun, Apr 26, 2009 at 11:38 PM, Ben Mabey wrote: > Rick DeNatale wrote: >> >> I finally plunked down for the beta RSpec bundle and I'm working >> through the initial example.  Although I'm a fairly experienced RSpec >> user, I'm stlll learning new t

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Rick DeNatale
On Mon, Apr 27, 2009 at 10:07 AM, aslak hellesoy wrote: > > > On Mon, Apr 27, 2009 at 3:47 PM, Rick DeNatale > wrote: >> >> On Mon, Apr 27, 2009 at 8:13 AM, Rick DeNatale >> wrote: >> > On Sun, Apr 26, 2009 at 11:38 PM, Ben Mabey wrote: >> &g

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Rick DeNatale
nd/features/codebreaker_starts_game.feature --format=html: No such file or directory false I'm guessing that the file it isn't finding is cucumber? Is there an environment variable I need to set in textmate? -- Rick DeNatale Blog: http://talklikeaduck.denhav

Re: [rspec-users] Current Evaluation of RSpec

2009-04-29 Thread Rick DeNatale
nheim, which prompted me to write that article. http://robsanheim.com/2008/01/25/why-i-use-testspec-over-rspec/ (It seems to be down right now, try googling for sanheim rspec and check the cached version) But that seems to be changing. Rob wrote this more recently: http://blog.thinkrelevance.

Re: [rspec-users] Current Evaluation of RSpec

2009-04-29 Thread Rick DeNatale
evolution of RSpec is fascinating- very organic and collaborative. For another recent barometer reading of how much ReSPECt RSpec gets these days, have a look at http://rubytrends.com/ -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://ww

Re: [rspec-users] Separation of duties Cucumber and Rspec ... RE: Noob question

2009-04-30 Thread Rick DeNatale
rios to keep you on the track of doing the next thing that NEEDS to be done is a very good way to stave off the desire to shave yaks. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denat

Re: [rspec-users] top posting and plain text

2009-05-06 Thread Rick DeNatale
On Wed, May 6, 2009 at 7:33 PM, Ben Mabey wrote: > + 1 > > > aslak hellesoy wrote: > > Folks, > > *snip* > > Thanks, > Aslak So let me get this right, you agreed with Aslak that you shouldn't top post. by top posting -- Rick DeNatale Blog: http:

Re: [rspec-users] [cucumber] Is it usual that selenium doesn't allow debugger?

2009-05-07 Thread Rick DeNatale
y inserting a rack app which just does this. David C. and I put support for the -u/--debugger options for the spec command a few releases back, I don't know if this has any effect on cucumber. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNa

[rspec-users] Can I run the same specs with different gems? Ideas?

2009-05-15 Thread Rick DeNatale
asks like rake spec:tzinfo rake spec:activesupport rake spec:both The problem is that I think I need something like the fork option for spec task similar to the one in the cucumber task, since once loaded I can't unload one or the other gem in the same ruby process. Is there a trick I'm mi

Re: [rspec-users] RSpec support on .Net with Gallio.

2009-05-16 Thread Rick DeNatale
ec in source code form for non-commercial > purposes?  I was unable to find the RSpec license to confirm.  Gallio itself > is open source and is distributed using the Apache License 2.0. RSpec is licensed under the MIT license: http://github.com/dchelimsky/rspec/blob/dfffe80e65067e8410f54d30b9de96a

Re: [rspec-users] Can I run the same specs with different gems? Ideas?

2009-05-17 Thread Rick DeNatale
On Sat, May 16, 2009 at 11:57 AM, David Chelimsky wrote: > On Fri, May 15, 2009 at 11:50 AM, Rick DeNatale > wrote: >>  Ideally I'd like to >> have rake tasks like >> >> rake spec:tzinfo >> rake spec:activesupport >> rake spec:both >> >

Re: [rspec-users] Can I run the same specs with different gems? Ideas?

2009-05-17 Thread Rick DeNatale
On Sun, May 17, 2009 at 9:46 AM, Rick DeNatale wrote: > So I tried to make a spectask to run the specs after require in > activesupport by adding this in my rake file: > > desc "Run all specs with activesupport" > Spec::Rake::SpecTask.new(:spec_as) do |t| >  t.spe

Re: [rspec-users] List Split

2009-05-18 Thread Rick DeNatale
> reason for Java programmers who want to use Cucumber to join the RSpec > ML. > As a long-time RSpec, and now Cucumber user, to me the Java stuff is the noise . -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http:

Re: [rspec-users] Class method not being stubbed

2009-05-24 Thread Rick DeNatale
stance method, so instead of: AdSenseHeavenParser.should_receive(:parse).with(keyword_list_contents).and_return({:keywords => [], :errors => []}) You should have controller.should_receive(:parse).with(keyword_list_contents).and_return({:keywords => [], :errors => []}) -- Rick De

  1   2   3   >