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

2009-08-27 Thread David Chelimsky
t; > 2009/8/26 Oliver Barnes : >> sure thing: >> >> http://pastie.org/595363 >> >> 2009/8/26 David Chelimsky : >>> On Tue, Aug 25, 2009 at 6:19 PM, Oliver >>> Barnes wrote: >>>> Hello, >>>> >>>> I'm struggl

Re: [rspec-users] Issue with ActiveRecord::Base.transaction in RSpec

2009-09-02 Thread David Chelimsky
On Tue, Sep 1, 2009 at 10:02 PM, Brian Cardarella wrote: > I have this example: > > http://pastie.org/602476 > > If I run it, it on the 2nd 'Country.count.should == 0' There's a verb missing :) I think you mean that "If I run it, it _fails_ on the 2nd ...", yes? What is the failure message you're

Re: [rspec-users] Issue with ActiveRecord::Base.transaction in RSpec

2009-09-02 Thread David Chelimsky
> - Brian > > On Sep 2, 3:11 am, David Chelimsky wrote: >> On Tue, Sep 1, 2009 at 10:02 PM, Brian Cardarella >> wrote: >> > I have this example: >> >> >http://pastie.org/602476 >> >> > If I run it, it on the 2nd 'Country.cou

Re: [rspec-users] undefined local variable or method `__FILE'

2009-09-02 Thread David Chelimsky
On Wed, Sep 2, 2009 at 5:22 PM, theLemcke wrote: > So I began with this setup: > http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition > > Created a basic rails setup, ran 'script/generate rspec' and 'script/ > generate rspec_model Note' and t

Re: [rspec-users] Issue with the "class" method of a mocked model

2009-09-08 Thread David Chelimsky
On Tue, Sep 8, 2009 at 2:53 PM, Philippe Creux wrote: > Hi everybody, > > I run into an issue with the "class" method of a mocked model. The following > expectation fails: > > @user = mock_model(Author) > is_author(user).should == true > > def is_author(user) >   case user >     when Author >  

Re: [rspec-users] Example's scope in the matcher?

2009-09-13 Thread David Chelimsky
On Sun, Sep 13, 2009 at 10:05 AM, Brian Cardarella wrote: > If I'm writing a matcher is there anyway to access the scope of the > example from within the matcher? (something that already exists in > rspec, not passing a new binding to the matcher) There is nothing implicit as of yet. You _can_ wr

Re: [rspec-users] controller specs with non-RESTful routes

2009-09-14 Thread David Chelimsky
On Fri, Sep 11, 2009 at 3:28 PM, Giuseppe Bertini wrote: > Hello list, > this should be an easy one, but I seem to be stuck. > What is the proper way to mimic a POST request for a named, non-RESTful > route? > > here's the route and the rest of the setup: > > map.accept_invitation '/accept_invitat

Re: [rspec-users] After upgrade to newest TM Bundle I get "Invalid char" error

2009-09-14 Thread David Chelimsky
On Mon, Sep 14, 2009 at 1:32 PM, Steffen Hiller wrote: > Hey, > > I finally upgraded from a rather old RSpec Textmate Bundle to the newest > version. (master:efe49e) My apologies, but the rspec bundle in the official textmate repo is quite dated. For the short term, please use the textmate bundle

[rspec-users] [ANN] rspec and rspec-rails 1.2.9.rc1 Released

2009-09-14 Thread David Chelimsky
rspec and rspec-rails version 1.2.9.rc1 have been released! === We're using the new rubygems prerelease feature to do proper release candidates. This feature was introduced to rubygems a couple of versions back, but I'd recommend updating to

Re: [rspec-users] Halting rake rspec

2009-09-15 Thread David Chelimsky
Right now there is no way. Please file a feature request at http://rspec.lighthouseapp.com. Cheers, David On Tue, Sep 15, 2009 at 2:12 PM, Anton Trapp wrote: > > Short question: How can I stop a rspec rake task without having to wait for > about 5 minutes (1 ctrl-c keypress autorepeat for every

Re: [rspec-users] Problems while loading 'spec/stubs/cucumber'

2009-09-15 Thread David Chelimsky
On Tue, Sep 15, 2009 at 7:51 PM, Ben Mabey wrote: > Rodrigo Flores wrote: >> >> Hi >> >> I'm reading the rspec book and I'm having problems when I require the file >> 'spec/stubs/cucumber'. When I go to an IRB prompt and type require >> 'spec/stubs/cucumber' after requiring another libraries [1] I

Re: [rspec-users] How to report rspec bugs in lighthouse?

2009-09-15 Thread David Chelimsky
On Wed, Sep 16, 2009 at 12:04 AM, Anton Trapp wrote: > > http://rspec.lighthouseapp.com -> Sign up -> The page at signup was not found > > Where is the bug tracker for lighthouse and hopefully lighthouse is not used > to track the bugs ;) http://help.lighthouseapp.com/ HTH, David ___

Re: [rspec-users] Expectation test: error says it's different, but it's printed the same way

2009-09-16 Thread David Chelimsky
On Wed, Sep 16, 2009 at 3:34 AM, Ramon Tayag wrote: > I put an expectation test, but it complains two things are different > when it prints it out in the error in the exact same way: > http://pastie.org/618481 Printing is printing. Time is _not_ time. The problem is that the times are off by mill

Re: [rspec-users] predicate matching

2009-09-18 Thread David Chelimsky
On Fri, Sep 18, 2009 at 10:42 AM, Yi Wen wrote: > Hi all, > > I noticed that if I have a method named has_somthing? and I do: > object.should_not have_somthing and it failed (as expected) when the method > returns nil. Actually, this should pass. The have_xxx and be_xxx matchers should pass/fail

Re: [rspec-users] predicate matching

2009-09-18 Thread David Chelimsky
write an explicit example: thing.has_xxx?.should_not == nil HTH, David > > Thanks > > Yi > > > On Sep 18, 2009, at 11:06 AM, David Chelimsky wrote: > >> On Fri, Sep 18, 2009 at 10:42 AM, Yi Wen wrote: >>> >>> Hi all, >>> >>&

Re: [rspec-users] Incompatible version?

2009-09-18 Thread David Chelimsky
On Fri, Sep 18, 2009 at 9:25 AM, Jorge Martin wrote: > 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,  

Re: [rspec-users] describe block proc parameter as alternative to before blocks?

2009-09-20 Thread David Chelimsky
On Sun, Sep 20, 2009 at 9:38 AM, nruth wrote: > I've been reading through the Rspec book to see if I missed any > tricks, and the discussion of before block use for context setup in > sec 12.6 struck me as interesting and something I had a knee-jerk > reaction to. > > I think that when you are usi

Re: [rspec-users] Cucumber senario

2009-09-22 Thread David Chelimsky
On Tue, Sep 22, 2009 at 11:24 PM, Mithun Perera wrote: > Hi all, > here is a scenario for create new Task > > Scenario: Create Valid Task >  Given I have no tasks >  And I am on the list of tasks >  When I follow "New Task" >  And I fill in "Description" with "Hello" >  And I press "Create" >  The

Re: [rspec-users] How to use --pattern ?

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 9:46 AM, Denis Haskin wrote: > (asked this yesterday on #rspec, no response...) > > Am I missing something obvious about --pattern?  It seems to only run the > first spec that matches the pattern; I expected it to run all that match. > > I tried: > spec spec/models --patter

Re: [rspec-users] bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 12:16 PM, DanS wrote: > I'm trying to install rspec so I can work with the new book chapter. > This what the console shows after running "rake install_gem" > >  Successfully built RubyGem >  Name: rspec >  Version: 1.2.9.rc1 >  File: rspec-1.2.9.rc1.gem > mv rspec-1.2.9.rc1

Re: [rspec-users] -- example ? (was Re: How to use --pattern ?)

2009-09-23 Thread David Chelimsky
c.rb > Finished in 1.527043 seconds > 0 examples, 0 failures > > I can see from the log that application initialization is happening, but > none of the examples are being run. > > Suggestions? spec --help ;) Cheers, David > > Thanks, > > dwh > > > > Da

Re: [rspec-users] bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 1:53 PM, DanS wrote: > Thanks so much for the help on this. > >> [sudo] gem install rspec --prerelease > > This seemed to install version 1.2.8 not the 1.2.9.rc1 I was looking > for. What OS and ruby/rubygems version? The --prerelease flag is a fairly recent addition and m

Re: [rspec-users] -- example ? (was Re: How to use --pattern ?)

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 2:00 PM, Denis Haskin wrote: > Reverse-engineering with --format e, it turns out --example is the *whole* > example name, e.g. > "LineItem should allow a offer code to be associated with it" > > So is there any *easy* way to run just a few files? Right now there is not, th

Re: [rspec-users] bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 3:20 PM, DanS wrote: >> What OS and ruby/rubygems version? The --prerelease flag is a fairly >> recent addition and may not work everywhere yet. > > Mac OS X 10.5.8 > ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] > gem 1.3.5 And what do you see if you type t

Re: [rspec-users] bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 3:41 PM, DanS wrote: >> And what do you see if you type this: >> >> gem q -rn rspec --prerelease > > *** REMOTE GEMS *** > > ERROR:  While executing gem ... (Gem::OperationNotSupportedError) >    Prereleases not supported on legacy repositories Well that explains why you'r

Re: [rspec-users] bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1

2009-09-23 Thread David Chelimsky
On Wed, Sep 23, 2009 at 3:53 PM, DanS wrote: >> Well that explains why you're not seeing --prerelease gems. What do >> you get from this: >> >> gem sources > > *** CURRENT SOURCES *** > > http://gems.rubyforge.org > http://gems.rubyonrails.org > http://gems.github.com > > -This is after I followed

Re: [rspec-users] Issues with rspec 1.2.8 and ruby 1.9

2009-09-24 Thread David Chelimsky
On Thu, Sep 24, 2009 at 8:18 AM, Xavier To wrote: > Hi, > > I just tried upgrading to ruby 1.9 and rspec has been giving me strange > errors when I run them with "rake spec". I get for almost every test gives > me a "can't modify frozen object" > > The other thing that confuses me is the fact that

Re: [rspec-users] How to spec transaction in Controller ?

2009-09-25 Thread David Chelimsky
On Fri, Sep 25, 2009 at 3:06 AM, Andrea Jahn wrote: > Hi, > > in my Controller I have some tansactions. I'm trying to write specs, which > test the two program pathes (an exception is thrown or no exception is > thrown). But the test seems always to go into the path, where the exception > is ca

Re: [rspec-users] controller specs with non-RESTful routes

2009-09-26 Thread David Chelimsky
On Sat, Sep 26, 2009 at 8:10 AM, Giuseppe Bertini wrote: >> Huh? Pretty please what? Matt and I have both responded. In my case I >> asked you about the versions you have. You didn't quote any of the >> previous posts in this thread, so I have no idea what you're asking >> for at this point. Did y

Re: [rspec-users] controller specs with non-RESTful routes

2009-09-26 Thread David Chelimsky
On Sat, Sep 26, 2009 at 1:56 AM, Giuseppe Bertini wrote: > Pretty please? :) Huh? Pretty please what? Matt and I have both responded. In my case I asked you about the versions you have. You didn't quote any of the previous posts in this thread, so I have no idea what you're asking for at this poi

Re: [rspec-users] controller specs with non-RESTful routes

2009-09-26 Thread David Chelimsky
On Sat, Sep 26, 2009 at 11:49 AM, giuseb wrote: >> The bad news is that this is a deficiency the underlying Rails testing >> framework that rspec-rails wraps. I tried the same example in a rails >> functional test and got the same failure: >> >> class InvitationsControllerTest < ActionController::

Re: [rspec-users] controller specs with non-RESTful routes

2009-09-26 Thread David Chelimsky
On Sat, Sep 26, 2009 at 9:44 AM, giuseb wrote: >> > So sorry, I must be missing something. >> > I am looking right now at this page: >> >> >http://www.ruby-forum.com/topic/195172 >> >> Well - that _should_ be one of two correct URLs. The forum is mirrored >> w/ a google group. I see there are post

Re: [rspec-users] rspec-rails question

2009-09-27 Thread David Chelimsky
On Sun, Sep 27, 2009 at 9:10 PM, Brian Cardarella wrote: > I have this controller test: http://pastie.org/632880  And the show > method has not been written for the HomeController yet. However, the > test still passes. Why? Hey Brian, This is due to a bug that has already been fixed: https://rs

Re: [rspec-users] rspec-rails question

2009-09-28 Thread David Chelimsky
lla wrote: > Excellent, that did the trick. Thanks Dave! > > On Sep 27, 11:05 pm, David Chelimsky wrote: >> On Sun, Sep 27, 2009 at 9:10 PM, Brian Cardarella >> wrote: >> > I have this controller test:http://pastie.org/632880 And the show >> > method has not

[rspec-users] feedback on 1.2.9.rc1

2009-09-28 Thread David Chelimsky
Hey all, I haven't received any feedback on the rspec and rspec-rails-1.2.9.rc1 gems. Is anybody using them? Any issues? TIA, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] feedback on 1.2.9.rc1

2009-09-28 Thread David Chelimsky
On Mon, Sep 28, 2009 at 10:11 AM, Ashley Moran wrote: > > On Sep 28, 2009, at 8:22 am, David Chelimsky wrote: > >> I haven't received any feedback on the rspec and rspec-rails-1.2.9.rc1 >> gems. Is anybody using them? Any issues? > > I was going to upgrade to t

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

2009-09-28 Thread David Chelimsky
On Mon, Sep 28, 2009 at 12:02 PM, Oliver Barnes wrote: > thanks! had given up on this already. changing to the new syntax > >  Image.stub!(:find, :return => @image) Not sure where you got this syntax from, but it doesn't do anything. Options are: Image.stub(:find).and_return(@image) Image.stub(:

Re: [rspec-users] Can't run specs after upgrading gems... get 0 tests, 0 assertions...

2009-09-29 Thread David Chelimsky
On Tue, Sep 29, 2009 at 9:37 PM, ignu wrote: > > So after I updated all my gems, I started getting: > > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/ > dependencies.rb:105:in `const_missing': uninitialized constant > Test::Unit::TestResult::TestResultFailureSupport (NameError

Re: [rspec-users] Grabbing the controller name before a new test case

2009-10-01 Thread David Chelimsky
On Thu, Oct 1, 2009 at 2:33 PM, Hates_ wrote: > > > On Oct 1, 7:27 pm, Stephen Eley wrote: >> On Thu, Oct 1, 2009 at 1:45 PM, Zach Dennis wrote: >> > Your name has intrigued me. Do you really hate underscores? :) >> >> Some people are ReallyPassionateAboutCamelCase. > > Underscores make me livid

Re: [rspec-users] Running a specific row in cucumber example table

2009-10-02 Thread David Chelimsky
On Fri, Oct 2, 2009 at 11:16 AM, Sam Treweek wrote: > I want to be able to execute only 1 row in an Scenario/Outline Example > table. Is there a method already created for me to access. I have > certain validation rules for only running 1 row of data coming from an > external request to execute cu

Re: [rspec-users] Can't run specs after upgrading gems... get 0 tests, 0 assertions...

2009-10-04 Thread David Chelimsky
On Sun, Oct 4, 2009 at 5:55 AM, Paco Guzman wrote: > David Chelimsky wrote: >> On Tue, Sep 29, 2009 at 9:37 PM, ignu wrote: >>> � � � �from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>> active_support/dependencies.rb:158:in `require' >>&g

Re: [rspec-users] Factory_girl Need help

2009-10-05 Thread David Chelimsky
On Mon, Oct 5, 2009 at 5:32 AM, Mithun Perera wrote: > Hi > please any body can help me to learn the basics of Factory girl method. > If someone know about these please tell me. > > I want to learn this from the beginning. Try starting with the readme at http://github.com/thoughtbot/factory_girl/

[rspec-users] [ANN] rspec 1.2.9 Released

2009-10-05 Thread David Chelimsky
rspec version 1.2.9 has been released! * * * * * Behaviour Driven Development for Ruby. Changes: ### Version 1.2.9 / 2009-10-05 * enhancements * manage backtrace-ignore patterns with Spec::

[rspec-users] [ANN] rspec-rails 1.2.9 Released

2009-10-05 Thread David Chelimsky
rspec-rails version 1.2.9 has been released! * * * * * Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.9 / 2009-10-05 *

Re: [rspec-users] [ANN] rspec-rails 1.2.9 Released

2009-10-06 Thread David Chelimsky
> > > On Tue, Oct 6, 2009 at 12:08 AM, David Chelimsky > wrote: >> >> rspec-rails version 1.2.9 has been released! >> >> * <http://rspec.info> >> * <http://rubyforge.org/projects/rspec> >> * <http://github.com/dchelimsky/rspec-r

Re: [rspec-users] Can't run specs after upgrading gems... get 0 tests, 0 assertions...

2009-10-06 Thread David Chelimsky
On Sun, Oct 4, 2009 at 6:35 PM, Stephen Eley wrote: > On Sun, Oct 4, 2009 at 4:15 PM, Paco Guzman wrote: >> >> If I change to :lib => false I got the same text in the execution. But >> If I uninstall test-unit 2.0.3 like Len said the examples executes >> right. > > There's a pernicious known bug

Re: [rspec-users] rake spec does not run specs -- just writes to spec.opts directory

2009-10-07 Thread David Chelimsky
On Wed, Oct 7, 2009 at 10:23 AM, davidm wrote: > I am having an issue on my integration server currently. When I run > rake spec locally my specs run and all is good but when I run rake > spec in on my integration box I get the following output > > Options written to spec/spec.opts. You can now us

Re: [rspec-users] Need Help

2009-10-07 Thread David Chelimsky
On Wed, Oct 7, 2009 at 3:57 PM, aslak hellesoy wrote: > > > On Wed, Oct 7, 2009 at 10:24 PM, Andrew Premdas wrote: >> >> 2009/9/25 Mithun Perera >>> >>> Mithun Perera wrote: >>> > Mithun Perera wrote: >>> >> Hi all, >>> >> I am an university student and these days i am on training period. So >>>

Re: [rspec-users] Need Help

2009-10-07 Thread David Chelimsky
On Wed, Oct 7, 2009 at 4:18 PM, Andrew Premdas wrote: > 2009/10/7 David Chelimsky >> >> On Wed, Oct 7, 2009 at 3:57 PM, aslak hellesoy >> wrote: >> > >> > >> > On Wed, Oct 7, 2009 at 10:24 PM, Andrew Premdas >> > wrote: >> >

Re: [rspec-users] Problems with Set after upgrade to RSpec 1.2.9

2009-10-10 Thread David Chelimsky
On Oct 10, 2009, at 5:54 PM, Shot (Piotr Szotkowski) wrote: It seems RSpec 1.2.9 is be breaking my specs in an interesting way (both under Ruby 1.8.7 and 1.9.1). The problem may very well be in my non-standard approach to monkey-patching core/stdlib classes, but my approach does work with RSpec

Re: [rspec-users] Problems with Set after upgrade to RSpec 1.2.9

2009-10-10 Thread David Chelimsky
On Sat, Oct 10, 2009 at 10:16 PM, David Chelimsky wrote: > On Oct 10, 2009, at 5:54 PM, Shot (Piotr Szotkowski) wrote: > >> It seems RSpec 1.2.9 is be breaking my specs in an interesting way >> (both under Ruby 1.8.7 and 1.9.1). The problem may very well be in >> my

Re: [rspec-users] What argument should I pass for mock(), stub() and double()

2009-10-11 Thread David Chelimsky
On Oct 11, 2009, at 6:21 AM, Lee Hambley wrote: John, I may well be wrong, but I believe it's just a `tag` or name, so when you print out - you see <#Double customer> rather tahn something inexplicable, that is at least how it appears to work using Mocha Not so much when _you_ print i

Re: [rspec-users] stub! and stubs

2009-10-12 Thread David Chelimsky
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 stub out a method for the duration of a single example, thr

Re: [rspec-users] stub! and stubs

2009-10-12 Thread David Chelimsky
On Oct 12, 2009, at 10:26 PM, Scott Taylor wrote: 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

Re: [rspec-users] Resources on using RSpec with Sinatra

2009-10-14 Thread David Chelimsky
On Wed, Oct 14, 2009 at 8:14 AM, doug livesey wrote: > Could anybody post resources on using RSpec with Sinatra? There's no official resource that I'm aware of, but google says there are over 2 million to choose from :) If anybody has specific resources they'd like to put focus on, feel free to

Re: [rspec-users] Model specs and ActiveRecord::TestCase

2009-10-14 Thread David Chelimsky
On Wed, Oct 14, 2009 at 3:01 PM, Elliot Winkler wrote: > Is there any reason why the ModelExampleGroup in rspec-rails inherits from > ActiveSupport::TestCase and not ActiveRecord::TestCase? I noticed this > because I tried to use assert_queries in one of my specs and obviously it > told me it didn

Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-17 Thread David Chelimsky
On Fri, Oct 16, 2009 at 7:21 AM, Sergey Rogachev wrote: > I don't know what is need to set in the variable ADDRESSES: > Organization.stub!(:find_by_id).with("100").and_return(mock_organization(:id > => "100", :addresses => ??? )) > > Somebody help me. Any ideas? I tried to find the solution of pro

Re: [rspec-users] Is it possible to access Example scope from Formatter?

2009-10-18 Thread David Chelimsky
On Sun, Oct 18, 2009 at 1:36 PM, Jarmo Pertman wrote: > Hello. > > I'm using Watir to perform some user interface tests. I've made my own > custom html formatter to make a screenshot and capture html of the > page, on which some spec fails. > > Now, the problem is simple - I have to access the br

Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-19 Thread David Chelimsky
On Mon, Oct 19, 2009 at 10:48 AM, Sergey Rogachev wrote: > *unexpected message > Please copy the exact error instead of re-typing it. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined method `use_transactional_fixtures=' on windows with spec_server

2009-10-20 Thread David Chelimsky
On Tue, Oct 20, 2009 at 1:44 PM, mikev wrote: > Any suggestions for what to check when running on windows with: > rspec (1.2.9) > rspec-rails (1.2.9) > rails 2.3.3 > ruby 1.8.6 > spec_server > FYI - spec_server is removed from rspec-rails as of 1.2.9 and is no longer being maintained by me. If a

Re: [rspec-users] controller code doesn't seem to be called within rspec test

2009-10-21 Thread David Chelimsky
On Wed, Oct 21, 2009 at 6:12 AM, Alexander Seidl wrote: > hi ben, > no impact, same result. > > cheers, > Alexander Please quote at least the relevant part of the previous email when you respond. I can get the context if I'm looking at mail in a web browser. Not so much on my phone. If you reve

Re: [rspec-users] controller code doesn't seem to be called within rspec test

2009-10-21 Thread David Chelimsky
On Wed, Oct 21, 2009 at 7:19 AM, Alexander Seidl wrote: > David Chelimsky wrote: > > [...] > > Please quote at least the relevant part of the previous email when you > > respond > > [...] > yes ok, i'll keep that in mind. > > > If you reverse lines 6 an

Re: [rspec-users] How can I test the values of css style attributes assigned to a div

2009-10-21 Thread David Chelimsky
On Oct 21, 2009, at 8:08 AM, Tom Hoen wrote: My site allows users to change the backround color (among other things) for their page. These values are stored in database. Their choices (or the default) are placed on the page using a block at the end of the block in the layout. Here

Re: [rspec-users] be_none and be_any don't seem to work properly

2009-10-21 Thread David Chelimsky
On Oct 19, 2009, at 2:12 PM, iain wrote: Hi all! I'm testing some named scopes. I use be_all(&:some_predicate) to test if all the elements in the collection are valid, which works, but when I try to test the inverse, it fails. You can see the complete code at: http://gist.github.com/213636 B

Re: [rspec-users] spec failing to run specs when spec.opts is present on 1.2.9

2009-10-22 Thread David Chelimsky
On Oct 22, 2009, at 10:28 AM, Paul Carey wrote: > Hi > > I ran across the following when running spec on an old merb app. > > $ cat spec/spec.opts > $ spec spec/models/topic_spec.rb > > Options written to spec/spec.opts. You can now use these options with: > spec --options spec/spec.opts > $ cat

Re: [rspec-users] Testing url_for

2009-10-27 Thread David Chelimsky
On Oct 27, 2009, at 8:21 AM, Rodrigo Rosenfeld Rosas wrote: Hi David, I'm giving a try to RSpec after we meet each other on Rails Summit Latin America and I must admit I'm enjoying using rspec/ machinist/faker. Since I have not written any controllers yet, I hadn't taken a chance to try we

Re: [rspec-users] Testing url_for

2009-10-27 Thread David Chelimsky
On Oct 27, 2009, at 6:48 PM, Rodrigo Rosenfeld Rosas > wrote: Em 27-10-2009 15:17, David Chelimsky escreveu: On Oct 27, 2009, at 8:21 AM, Rodrigo Rosenfeld Rosas wrote: Hi David, I'm giving a try to RSpec after we meet each other on Rails Summit Latin America and I must admit I&#x

Re: [rspec-users] RSpec-Rails not tearing down the session?

2009-10-27 Thread David Chelimsky
On Oct 27, 2009, at 9:39 PM, Brian Cardarella wrote: I noticed that a session that I am setting up in one exa,ple is still available in another. Is RSpec-Rails supposed to tear down the session or should I be doing this myself? Unless you've got a before(:all) block, you should be getting a

Re: [rspec-users] How Can I inveke a code example in another one

2009-10-28 Thread David Chelimsky
On Oct 28, 2009, at 2:56 AM, zhjie685 wrote: Hi, I'm new to rspec. How could I transform the Unit:Tests code like def test_logout login get :logout assert_not_logged_in end def assert_not_logged_in assert_block { session["user"].nil? } end that a test method invoke anoth

Re: [rspec-users] at_exit in spec file?

2009-10-28 Thread David Chelimsky
On Oct 28, 2009, at 10:41 AM, Student wrote: I need to perform some work (shutdown mysql servers & delete their data directories) at the end of my tests. Naturally, I would like to use at_exit. HOWEVER, when I do, the spec file gets loaded twice (and the tests are run twice). Help? For bett

Re: [rspec-users] Troble running controller spec

2009-10-28 Thread David Chelimsky
On Wed, Oct 28, 2009 at 8:40 AM, Amit Kulkarni wrote: > Hello, > Any updates on the above topic Please be sure to quote enough of the previous topic so those of us reading on phones can respond to you. There is a thread about this on the Cucumber list - please see if this information helps

Re: [rspec-users] Rspec Tutorial

2009-10-28 Thread David Chelimsky
On Oct 28, 2009, at 1:13 PM, Lee Hambley wrote: Matt, Thats a good start, can I suggest adding it to the google group homepage, whoever has admin control? That would be me. Done. Anyone is free to update the http://wiki.github.com/dchelimsky/rspec/get-in-touch wiki page. Cheers, David

Re: [rspec-users] @request not available in before(:all) but is available in before(:each) in RSpec-Rails

2009-10-28 Thread David Chelimsky
On Oct 28, 2009, at 2:05 PM, Brian Cardarella wrote: More playing with RSpec-Rails. I've noticed that I do not have access to the @request object in before (:all) but do in before(:each) Is this expected behavior? Yes. In general, before(:all) is intended for setting global state and sh

Re: [rspec-users] at_exit in spec file?

2009-10-28 Thread David Chelimsky
Sorry about that :( And thanks, Ashley, for righting (and writing) my wrong. Cheers, David On Oct 28, 2009, at 4:06 PM, Student wrote: Sweet! Thanks! On Oct 28, 3:52 pm, Ashley Moran wrote: On 28 Oct 2009, at 20:42, Student wrote: So now I'm back to the "undefined method `after' for ma

Re: [rspec-users] problem with should_receive in controller spec

2009-10-29 Thread David Chelimsky
On Oct 29, 2009, at 5:56 AM, Amit Kulkarni wrote: I am trying to write controller spec but i am getting some problem. Following is the controller code: def create @bb_post = @feature.posts.new( params[ :bb_post ] ) if @bb_post.save flash[ :notice ] = 'Blog post was successfully crea

Re: [rspec-users] [BDD] View specs and cucumber -- duplication of effort?

2009-10-29 Thread David Chelimsky
On Oct 28, 2009, at 10:19 PM, Ben Mabey wrote: nruth wrote: Hi Guys I'm going to put the cat amongst the pigeons here in the hope of some clarity falling out of the sky on me. My question is this: In a world with Cucumber what is the value of view specs? In the community (railscamp, for examp

Re: [rspec-users] [BDD] View specs and cucumber -- duplication of effort?

2009-10-29 Thread David Chelimsky
On Oct 29, 2009, at 10:09 AM, Stephen Eley wrote: On Thu, Oct 29, 2009 at 10:19 AM, David Chelimsky > wrote: Everything in between falls along a spectrum, and it's up to you to find the sweet spot, which _will_ vary from team to team, project to project, and even view to view.

Re: [rspec-users] HOWTO: Background tasks during test (ugly)

2009-10-29 Thread David Chelimsky
On Oct 29, 2009, at 11:17 AM, Student wrote: forever.sh: while true ; do sleep 5 ; done tc_forks.rb 2.times do fork {`nohup sh forever.sh &`} end describe "We can do tests in the air" do it "Here is the first test" do 1.should not_raise 1.should_not raise_error end end spec tc_

Re: [rspec-users] cyclomatic complexity

2009-10-29 Thread David Chelimsky
On Oct 29, 2009, at 12:21 PM, Elza Morelli wrote: Hi, Someone can help me? I am using Rspec to create tests and Rcov to have some code coverage information, however my client would like to have some information on cyclomatic complexity. Can I use any option of Rcov to obtain it or should I

Re: [rspec-users] undefined method get

2009-10-31 Thread David Chelimsky
On Oct 29, 2009, at 6:04 PM, BrianTheCoder wrote: So here's the deal. Was using rack-test in rspec, cause I like passing paths instead of an action name, but it doesn't have access to the session, flash, cookies, etc. So I tried to switch to normal rspec and here's what I get (gist is working for

Re: [rspec-users] Problem with before filters

2009-11-02 Thread David Chelimsky
On Nov 2, 2009, at 3:35 AM, Amit Kulkarni wrote: Following is the scenario. describe BbPostsController, "POST Create" do context "Admin" do fixtures :users, :bb_posts, :user_channels, :channels, :channel_features it "should save post" do login_as(:amit) # Added to pass be

Re: [rspec-users] spec runner

2009-11-02 Thread David Chelimsky
On Nov 2, 2009, at 3:10 PM, BrianTheCoder wrote: How do I just invoke the spec runner through code? I have a watchr file that I want to run the specs when files change, but I am shelling out right now, so i though i'd speed it up by keeping it ruby. I tried digging through the spec file, but lo

Re: [rspec-users] Can't run specs after upgrading gems... get 0 tests, 0 assertions...

2009-11-02 Thread David Chelimsky
y patch in RSpec for the time being. WDYT? David Chelimsky wrote: On Sun, Oct 4, 2009 at 6:35 PM, Stephen Eley wrote: Test::Unit gem into RSpec? �And then require the bundled Test::Unit directly on its path instead of the gem and Ruby loadpaths? Sure, for stock Ruby 1.8 users this would be

Re: [rspec-users] better documentation?

2009-11-04 Thread David Chelimsky
On Nov 4, 2009, at 4:51 PM, rogerdpack wrote: I'm interested in helping the documentation for rspec, ex: http://rspec.info/ described similarly to how this person feels (that there's not too much "getting started" docu). http://creativedeletion.com/2007/05/27/the-new-rspec-format-testingspeci

Re: [rspec-users] unable to build gem

2009-11-04 Thread David Chelimsky
On Wed, Nov 4, 2009 at 3:34 PM, rogerdpack wrote: > Is the following expected? > Absolutely not. I moved some things around and failed to update the manifest. This is fixed in git HEAD now, so please update and try again. Cheers, David > > > C:\dev\ruby\downloads\rspec>rake gem > (in C:/dev/r

Re: [rspec-users] odd error

2009-11-04 Thread David Chelimsky
On Wed, Nov 4, 2009 at 3:37 PM, rogerdpack wrote: > with 1.8.6 + rspec 1.2.9 (sorry couldn't try trunk, see previous post) > > I get: > > > C:\dev\ruby\old\arguments>spec spec\arguments_spec.rb > ..F 0.00 0.00 0.00 ( 0.00) > .F 0.00 0.00 0.00

Re: [rspec-users] Error executing specs using Ruby 1.9.1p243 and RSpec 1.2.9

2009-11-04 Thread David Chelimsky
On Tue, Nov 3, 2009 at 7:25 AM, Conrad Taylor wrote: > Hi, 'rake spec' failed to run on Ruby 1.9.1p243 and RSpec 1.2.9. Hi Conrad, If this was a problem in the gem, it is now fixed: $ rvm 1.9.1 $ which ruby /Users/david/.rvm/ruby-1.9.1-p243/bin/ruby $ rake spec ... 1522 examples, 0 failures,

Re: [rspec-users] [BDD] View specs and cucumber -- duplication of effort?

2009-11-04 Thread David Chelimsky
On Wed, Nov 4, 2009 at 3:36 PM, Stephen Eley wrote: > On Wed, Nov 4, 2009 at 3:24 PM, Andrew Premdas wrote: > > > > Personally I now think nested steps are evil - but thats another story :) > > It sounds like an entertaining one. I'd love to hear why sometime. > (Though whether the right place

Re: [rspec-users] [Rails] render_to_string in a controller fails under RSpec

2009-11-05 Thread David Chelimsky
On Thu, Nov 5, 2009 at 5:23 PM, Joel Young wrote: > I'm using render_to_string in a controller to send some JSON data with > an HTML fragment. Unfortunately, it seems that rspec-rails breaks that > by intercepting render and simply recording that a render was called. > Using rspec-rails and rspec

Re: [rspec-users] "lambda Should Change" Behavior Failing When Checking Time

2009-11-07 Thread David Chelimsky
On Sat, Nov 7, 2009 at 6:18 PM, Carlos Rodriguez wrote: > Hello, > > I'm having a problem with RSpec when using the "lambda should change > behavior". > > This is happening in a Rails 2.3.4 app and I'm running the following > in my test environment: > > 'cucumber', :version => '0.4.2' > 'faker',

Re: [rspec-users] rake spec runs my spec:remote specs!

2009-11-07 Thread David Chelimsky
On Fri, Nov 6, 2009 at 8:44 PM, jko170 wrote: > In my spec folder, I have a "remote" directory, which contains my > specs for live data transferring with an outside api. When I run rake > spec, it runs the remote specs and I don't want it to. Keep in mind > there is NO lib/tasks/remote.task file.

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-07 Thread David Chelimsky
ent pages. As for internals, my goal for the Cucumber features is to provide an executable set of documentation for end users to understand how to use RSpec. Not so much to expose internals, which I think is better addressed in the RSpec code examples themselves. Make sense? > > On Fri, Nov 6

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread David Chelimsky
On Sat, Nov 7, 2009 at 11:39 PM, Stephen Eley wrote: > On Sat, Nov 7, 2009 at 9:31 PM, David Chelimsky > wrote: > > > > As for internals, my goal for the Cucumber features is to provide an > > executable set of documentation for end users to understand how to use &

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread David Chelimsky
On Sun, Nov 8, 2009 at 5:55 AM, Rodrigo Rosenfeld Rosas < lboc...@yahoo.com.br> wrote: > David Chelimsky escreveu: > >> >> As for internals, my goal for the Cucumber features is to provide an >> executable set of documentation for end users to understand how to use &

Re: [rspec-users] Error executing specs using Ruby 1.9.1p243 and RSpec 1.2.9

2009-11-08 Thread David Chelimsky
/bmabey-fakefs-0.1.1.1/lib/fakefs.rb What version of fakefs are you using? > > > -Conrad > > On Nov 4, 2:28 pm, David Chelimsky wrote: > > On Tue, Nov 3, 2009 at 7:25 AM, Conrad Taylor > wrote: > > > Hi, 'rake spec' failed to run on Ruby 1.9.1p243 and RSp

Re: [rspec-users] undefined method `route_for

2009-11-10 Thread David Chelimsky
On Tue, Nov 10, 2009 at 4:44 AM, Amit Kulkarni wrote: > Hi all, > I am writing scenarios for testing my routes but it is giving me error > as undefined method `route_for and also for params_from. > Did i miss something which i need to add in my controller > > My code is as follows: > > require Fi

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-10 Thread David Chelimsky
On Tue, Nov 10, 2009 at 2:25 PM, DEfusion wrote: > I'm getting really cheesed off with RSpec not matching some of my > routes when controller testing when I have subdomain checking > (courtesy of subdomain-fu) on namespaces. These routes appear in the > rake routes output, and work fine via HTTP

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-10 Thread David Chelimsky
; that worked fine. So I put un-commented my spec bit by bit and it > > > works fine. > > > > > I'm sure I've had this problem before. If I do re-create it I'll post > > > more details here. > > > > > =D > > > > > On Nov 1

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-11 Thread David Chelimsky
ed or invoked after rspec, or the two are monkey patching the same things and creating a conflict. Would you do me a favor and slap together a small demo app with the specific version of rspec and subdomain-fu that you are using bundled (vendor/gems preferable), zip it up and submit it in a ticket to

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-11 Thread David Chelimsky
On Wed, Nov 11, 2009 at 4:54 AM, David Chelimsky wrote: > On Wed, Nov 11, 2009 at 3:12 AM, DEfusion wrote: > >> Hi David, >> >> Yeah I had used the new style in the past and got the same issue, I >> just accidentally reverted to the old style. >> >&

  1   2   3   4   5   6   7   8   9   10   >