From noreply at rubyforge.org Fri Jun 1 00:44:58 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 00:44:58 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11259 ] windows?: autotest suppresses output Message-ID: <20070601044458.6B64B5240C00@rubyforge.org> Bugs item #11259, was opened at 2007-05-31 12:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11259&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Erik Ostrom (eostrom) Assigned to: Nobody (None) Summary: windows?: autotest suppresses output Initial Comment: When I run rspec under autotest (with the change I noted in 11258), it seems to run okay; it detects specs that should be run anew; it runs them (as evidenced by test.log); but it never, ever shows me any output from the spec runner. Even a test known to fail shows me nothing. If I use rspec without autotest, everything works fine. If I use Test::Unit instead of rspec, autotest shows me the full test runner output. So it must be a problem with the way rspec and autotest interact. (I don't know if this is actually a Windows problem, but it seems plausible.) ---------------------------------------------------------------------- >Comment By: Erik Ostrom (eostrom) Date: 2007-05-31 21:44 Message: Another useful piece of information I could have given you, it turns out, is the contents of my spec.opts file, which starts with '--colour'. With that removed, the bug goes away. That's probably good enough for me. In case it'll help track down this problem now or in the future, this is as far as I got: * In run_tests() in autotest.rb, the loop that's supposed to loop over characters in the test command's output gets EOF immediately, i.e., there's apparently no output from the spec script. * In colour() in base_text_formatter.rb, @colour and output_to_tty? are both true, so presumably the colour-formatted string is returned. I don't know what happens to it after it's returned and before it gets output. ---------------------------------------------------------------------- Comment By: Erik Ostrom (eostrom) Date: 2007-05-31 20:46 Message: Sorry, I forgot. I think I've got the latest everything: * Windows XP SP2 * Ruby 1.8.6 * Rails 1.2.3 * RSpec and Spec::Rails r2064 * ZenTest 3.6.0 ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-31 12:27 Message: Before investigating this we need to know the versions of all relevant software you are using, for example: * OS X 10.4.9 * Ruby 1.8.6 * RSpec 1.8.2 or RSpec trunk r1643 * Spec::Rails 1.8.2 or Spec::Rails tag r1234... * Rails 1.2.3 or Rails edge r5645 * Whatever other relevant software. Without this information it's like solving 1 equation (your question) with 5 unknown variables (the versions). We strongly recommend that you use the latest released version of RSpec, alternatively the subversion trunk (if you're the bleeding edge kind of person). ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11259&group_id=797 From noreply at rubyforge.org Fri Jun 1 03:33:17 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 03:33:17 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10932 ] Documentation on upgrading the Rspec on Rails Plugin Message-ID: <20070601073317.B34F952409AD@rubyforge.org> Feature Requests item #10932, was opened at 2007-05-20 00:44 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 Category: rails plugin Group: None >Status: Open Priority: 3 Submitted By: Brian Takita (btakita) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Documentation on upgrading the Rspec on Rails Plugin Initial Comment: Upgrading rpsec can be a pain. There should be some procedues. e.g. svn mv Rename existing plugin install latest version of plugin remove renamed old version of plugin ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-01 03:33 Message: This won't work for people who checked it into svn - or people using svn:externals. It looks like these instructions will only work for people not using an scm at all(?) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-31 19:40 Message: Added this to docs in r2067 # from the root of your rails project rm -rf vendor/plugins/rspec rm -rf vendor/plugins/rspec_on_rails ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails ruby script/generate rspec ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 From noreply at rubyforge.org Fri Jun 1 06:44:48 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 06:44:48 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10932 ] Documentation on upgrading the Rspec on Rails Plugin Message-ID: <20070601104448.E4EA0524096F@rubyforge.org> Feature Requests item #10932, was opened at 2007-05-20 04:44 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) >Assigned to: David Chelimsky (dchelimsky) Summary: Documentation on upgrading the Rspec on Rails Plugin Initial Comment: Upgrading rpsec can be a pain. There should be some procedues. e.g. svn mv Rename existing plugin install latest version of plugin remove renamed old version of plugin ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 10:44 Message: Good point. I'll extend it. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-01 07:33 Message: This won't work for people who checked it into svn - or people using svn:externals. It looks like these instructions will only work for people not using an scm at all(?) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-31 23:40 Message: Added this to docs in r2067 # from the root of your rails project rm -rf vendor/plugins/rspec rm -rf vendor/plugins/rspec_on_rails ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails ruby script/generate rspec ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 From noreply at rubyforge.org Fri Jun 1 11:44:54 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 11:44:54 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10781 ] Hierarchical specdoc output for shared behaviors Message-ID: <20070601154454.DE0C15240AD3@rubyforge.org> Feature Requests item #10781, was opened at 2007-05-11 10:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10781&group_id=797 Category: reports Group: None Status: Open Priority: 3 Submitted By: Greg Spurrier (gregspurrier) Assigned to: Nobody (None) Summary: Hierarchical specdoc output for shared behaviors Initial Comment: When shared behaviors are included into a behavior, there is no indication of the source of the behavior in the specdoc output. This can be confusing when multiple shared behaviors are included and have similar examples. E.g.: describe "REST index action", :shared => true do it "should return status code 200" do end end describe "REST show action", :shared => true do it "should return status code 200" do end end describe "FooController" do it_should_behave_like "REST index action" it_should_behave_like "REST show action" end gives the following output with 0.9.4: % spec -fs a_spec.rb FooController - should return status code 200 - should return status code 200 It would be better, IMHO, if it looked like: FooController - should behave like REST index action and: - should return status code 200 - should behave like REST show action and: - should return status code 200 What do you guys think? ---------------------------------------------------------------------- >Comment By: Greg Spurrier (gregspurrier) Date: 2007-06-01 08:44 Message: After the discussion in the previous comments for this feature request and attending the RSpec BoF at RailsConf, I've come to the conclusion that this feature request is unnecessary and can be closed. ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 16:35 Message: Yes, there may indeed be a new construct waiting to emerge add address this elegantly. Essentially, what I'm looking for is a way to group a set of behaviors that pertain to a superclass (or module that is mixed in) and then include them into the specification of derived classes. Sort of a spec hierarchy that runs parallel to the class hierarchy. Looking at the RFE you mentioned, unless I'm missing something, the "aspects" there seem to be more about namespace management than about defining generic aspects that can be included into multiple behaviors. Anyway, I'll continue to ponder it over the weekend as well, and maybe something will come to one of us. :) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 16:11 Message: I hadn't really thought of shared behaviours as being about context. I think that the "concrete" behaviours that use them are where context should be expressed. I see the problem, but I feel like this is a misuse of shared behaviors and that there is some other construct that is trying to be emerge here. One thought is an RFE from a while back about "aspects" (or "facets"): http://rubyforge.org/tracker/?group_id=797&atid=3152&func=detail&aid=8654 Take a look at that and let me know what you think about it vis a vis this particular problem. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 16:06 Message: OK, now I understand the problem better. Let me think on it for a bit. ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 15:18 Message: The output you describe is great, but it requires you to put "if it's raining" in the description of each example that is part of the "when it's raining" behavior, which seems redundant. Writing the spec the natural way in which the descriptions of the examples are taken to be within the context of the description: describe "A when it's sunny", :shared => true do it "should be open for business" do end it "should be use natural lighting" do end end describe "A when it's cloudy", :shared =>true do it "should be open for business" do end it "should be use electric lighting" do end end describe "A", :shared => true do it_should_behave_like "A when it's sunny" it_should_behave_like "A when it's cloudy" end describe "B's inherited behavior" do it_should_behave_like "A" end gives: B's inherited behavior - should be open for business - should be use natural lighting - should be open for business - should be use electric lighting which is what I was referring to as being confusing. It'd be nice if there was a way for the context of the behavior to carry through to the specdoc output so that the output can be unambiguous, but the specs can still read naturally without having to explicitly include the context in each example. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 12:10 Message: Why would the output be confusing? Everything just gets flattened, so for an A that does 2 things when it rains and 2 other things when it's cloudy, with subclasses B and C, the output would say: B - should do thing 1 if it's raining - should do thing 2 if it's raining - should do thing 3 if it's cloudy - should do thing 4 if it's cloudy C - should do thing 1 if it's raining - should do thing 2 if it's raining - should do thing 3 if it's cloudy - should do thing 4 if it's cloudy Looking at either listing, everything seems clear. What am I missing? ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 11:38 Message: I can certainly see your point for simple examples like the one in the docs: Officer - should be payable - should be bonusable - should be optionable is indeed preferable to: Officer - should behave like All Managers, and: - should behave like All Employees, and : - be bonusable - be payable - be optionable Let me describe the root issue that I'm grappling with and that initially led me to request hierarchical output. Perhaps there's a beter way. How do you deal with subclasses that should share multiple behaviors with their superclass. E.g., suppose you have: class A #... end class B < A # ... end and behaviors like: describe "A when it is sunny", :shared => true do end describe "A when it is cloudy", :shared => true do end For B, you can do: describe "B when it is sunny" do it_should_behave_like "A when it is sunny" end describe "B when it is cloudy" do it_should_behave_like "A when it is cloudy" end and, maybe that's the right way to do it. But, it leads to a lot of repeated typing when A has a lot of shared behaviors or there are a lot of subclasses of A. So, I was thinking about doing something like this for A: describe "A", :shared => true do it_should_behave_like "A when it is sunny" it_should_behave_like "A when is is cloudy" end And for B: describe "B inherited behavior" do it_should_behave_like "A" end The advantage of this approach is that you can continue to add shared behaviors to the "A" description without having to go update the specs of all the subclasses. But, with the current specdoc output, this aggregating of shared behaviors into another shared behavior would be pretty confusing in the output. Maybe there's another way to tackle this. Suggestions? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 11:13 Message: Personally I think that makes things more confusing. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10781&group_id=797 From noreply at rubyforge.org Fri Jun 1 11:45:22 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 11:45:22 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10781 ] Hierarchical specdoc output for shared behaviors Message-ID: <20070601154522.E54495240AF4@rubyforge.org> Feature Requests item #10781, was opened at 2007-05-11 10:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10781&group_id=797 Category: reports Group: None >Status: Closed Priority: 3 Submitted By: Greg Spurrier (gregspurrier) Assigned to: Nobody (None) Summary: Hierarchical specdoc output for shared behaviors Initial Comment: When shared behaviors are included into a behavior, there is no indication of the source of the behavior in the specdoc output. This can be confusing when multiple shared behaviors are included and have similar examples. E.g.: describe "REST index action", :shared => true do it "should return status code 200" do end end describe "REST show action", :shared => true do it "should return status code 200" do end end describe "FooController" do it_should_behave_like "REST index action" it_should_behave_like "REST show action" end gives the following output with 0.9.4: % spec -fs a_spec.rb FooController - should return status code 200 - should return status code 200 It would be better, IMHO, if it looked like: FooController - should behave like REST index action and: - should return status code 200 - should behave like REST show action and: - should return status code 200 What do you guys think? ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-06-01 08:44 Message: After the discussion in the previous comments for this feature request and attending the RSpec BoF at RailsConf, I've come to the conclusion that this feature request is unnecessary and can be closed. ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 16:35 Message: Yes, there may indeed be a new construct waiting to emerge add address this elegantly. Essentially, what I'm looking for is a way to group a set of behaviors that pertain to a superclass (or module that is mixed in) and then include them into the specification of derived classes. Sort of a spec hierarchy that runs parallel to the class hierarchy. Looking at the RFE you mentioned, unless I'm missing something, the "aspects" there seem to be more about namespace management than about defining generic aspects that can be included into multiple behaviors. Anyway, I'll continue to ponder it over the weekend as well, and maybe something will come to one of us. :) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 16:11 Message: I hadn't really thought of shared behaviours as being about context. I think that the "concrete" behaviours that use them are where context should be expressed. I see the problem, but I feel like this is a misuse of shared behaviors and that there is some other construct that is trying to be emerge here. One thought is an RFE from a while back about "aspects" (or "facets"): http://rubyforge.org/tracker/?group_id=797&atid=3152&func=detail&aid=8654 Take a look at that and let me know what you think about it vis a vis this particular problem. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 16:06 Message: OK, now I understand the problem better. Let me think on it for a bit. ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 15:18 Message: The output you describe is great, but it requires you to put "if it's raining" in the description of each example that is part of the "when it's raining" behavior, which seems redundant. Writing the spec the natural way in which the descriptions of the examples are taken to be within the context of the description: describe "A when it's sunny", :shared => true do it "should be open for business" do end it "should be use natural lighting" do end end describe "A when it's cloudy", :shared =>true do it "should be open for business" do end it "should be use electric lighting" do end end describe "A", :shared => true do it_should_behave_like "A when it's sunny" it_should_behave_like "A when it's cloudy" end describe "B's inherited behavior" do it_should_behave_like "A" end gives: B's inherited behavior - should be open for business - should be use natural lighting - should be open for business - should be use electric lighting which is what I was referring to as being confusing. It'd be nice if there was a way for the context of the behavior to carry through to the specdoc output so that the output can be unambiguous, but the specs can still read naturally without having to explicitly include the context in each example. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 12:10 Message: Why would the output be confusing? Everything just gets flattened, so for an A that does 2 things when it rains and 2 other things when it's cloudy, with subclasses B and C, the output would say: B - should do thing 1 if it's raining - should do thing 2 if it's raining - should do thing 3 if it's cloudy - should do thing 4 if it's cloudy C - should do thing 1 if it's raining - should do thing 2 if it's raining - should do thing 3 if it's cloudy - should do thing 4 if it's cloudy Looking at either listing, everything seems clear. What am I missing? ---------------------------------------------------------------------- Comment By: Greg Spurrier (gregspurrier) Date: 2007-05-11 11:38 Message: I can certainly see your point for simple examples like the one in the docs: Officer - should be payable - should be bonusable - should be optionable is indeed preferable to: Officer - should behave like All Managers, and: - should behave like All Employees, and : - be bonusable - be payable - be optionable Let me describe the root issue that I'm grappling with and that initially led me to request hierarchical output. Perhaps there's a beter way. How do you deal with subclasses that should share multiple behaviors with their superclass. E.g., suppose you have: class A #... end class B < A # ... end and behaviors like: describe "A when it is sunny", :shared => true do end describe "A when it is cloudy", :shared => true do end For B, you can do: describe "B when it is sunny" do it_should_behave_like "A when it is sunny" end describe "B when it is cloudy" do it_should_behave_like "A when it is cloudy" end and, maybe that's the right way to do it. But, it leads to a lot of repeated typing when A has a lot of shared behaviors or there are a lot of subclasses of A. So, I was thinking about doing something like this for A: describe "A", :shared => true do it_should_behave_like "A when it is sunny" it_should_behave_like "A when is is cloudy" end And for B: describe "B inherited behavior" do it_should_behave_like "A" end The advantage of this approach is that you can continue to add shared behaviors to the "A" description without having to go update the specs of all the subclasses. But, with the current specdoc output, this aggregating of shared behaviors into another shared behavior would be pretty confusing in the output. Maybe there's another way to tackle this. Suggestions? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-11 11:13 Message: Personally I think that makes things more confusing. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10781&group_id=797 From noreply at rubyforge.org Fri Jun 1 14:25:55 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 14:25:55 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-10577 ] Rails with Oracle breaks 0.9.2 Message-ID: <20070601182555.1C4AF52409E6@rubyforge.org> Bugs item #10577, was opened at 2007-05-04 10:57 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10577&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: John Andrews (jandrews) Assigned to: Nobody (None) Summary: Rails with Oracle breaks 0.9.2 Initial Comment: Upgrading to rspec 0.9.2 from 0.8.2 using Oracle database with ActiveRecord breaks due to the following: oracle_adapter.rb:316 (owner, table_name) = @connection.describe(table_name) @connection is an instance of OCI8AutoRecover which itself delegates the describe method to OCI8. class OCI8AutoRecover < DelegateClass(OCI8) #... # no def describe method end DelegateClass internally uses method_missing to call the delegate class' describe class OCI8 #:nodoc: def describe(name) #... end #... end The problem is that rspec defines Kernel#describe, so method_missing never catches the call to delegate and it fails from rspec because there is obviously no block given. My work-around modifies 2 files. I will just include the methods I changed because I don't have diffs from trunk. from file: rspec_on_rails/lib/spec/rails/extensions/kernel.rb def describe(*args, &block) # assuming that if a block is not given that it is not a call # for rspec if block_given? args << {} unless Hash === args.last args.last[:spec_path] = caller(0)[1] end original_describe(*args, &block) end from file: rspec-0.9.2/lib/spec/runner/extensions/kernel.rb def describe(*args, &block) if block_given? raise ArgumentError if args.empty? register_behaviour(Spec::DSL::BehaviourFactory.create(*args, &block)) else # not the describe that we are looking for # it's probably a call from the oracle adapter super *args end end I don't know if this is the best way to fix the issue, but it works for me and all my specs pass again. if you need more info or someone to test a fix for Oracle I am able to help. ---------------------------------------------------------------------- Comment By: sinclair bain (sinclair) Date: 2007-06-01 13:25 Message: Hi, I just ran into this problem in rspec_for_rails 1.0.0. The solution I think we will settle for in the short term is a monkey patch to the OCI8AutoRecover class. The patch implements the #describe method in the OCI8AutoRecover class (via a module include). The patch file is in our rails_app/lib directory and is #required in the environment.rb. This is the implementation: module OracleAdapterPatch # rspec method name collision patch def describe(obj) puts "OCI8AutoRecover#describe( #{obj} ) forwarded to #{@connection}" @connection.describe(obj) end end OCI8AutoRecover.send(:include, OracleAdapterPatch) As is stated below this is (still) a band-aid approach. Cheers! sinclair ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-05 18:56 Message: I'm uncomfortable with this solution. It's a band-aid for this particular example, but someone else might come along and do something similar - using method_missing to delegate to another object WITH a block expected in that object's #describe method. Does anyone have any other suggestions? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10577&group_id=797 From noreply at rubyforge.org Fri Jun 1 18:47:05 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 18:47:05 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070601224706.0F05A52409E6@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Nobody (None) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Fri Jun 1 19:28:22 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 19:28:22 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070601232822.8D8AE52409E6@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 22:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Nobody (None) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 23:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Fri Jun 1 20:26:59 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Jun 2007 20:26:59 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070602002659.F02B152409E6@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Nobody (None) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- >Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 17:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 16:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Sat Jun 2 14:42:18 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Jun 2007 14:42:18 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10932 ] Documentation on upgrading the Rspec on Rails Plugin Message-ID: <20070602184218.96FF45240ABF@rubyforge.org> Feature Requests item #10932, was opened at 2007-05-20 04:44 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Documentation on upgrading the Rspec on Rails Plugin Initial Comment: Upgrading rpsec can be a pain. There should be some procedues. e.g. svn mv Rename existing plugin install latest version of plugin remove renamed old version of plugin ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 10:44 Message: Good point. I'll extend it. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-01 07:33 Message: This won't work for people who checked it into svn - or people using svn:externals. It looks like these instructions will only work for people not using an scm at all(?) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-31 23:40 Message: Added this to docs in r2067 # from the root of your rails project rm -rf vendor/plugins/rspec rm -rf vendor/plugins/rspec_on_rails ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails ruby script/generate rspec ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10932&group_id=797 From rbarlow at raymanoz.com Sun Jun 3 12:57:32 2007 From: rbarlow at raymanoz.com (Raymond Barlow) Date: Sun, 03 Jun 2007 17:57:32 +0100 Subject: [rspec-devel] rspec runner for eclipse Message-ID: <4662F2FC.3040408@raymanoz.com> Hi guys, I'm looking at writing an rspec runner for eclipse like the jUnit and ruby's TestUnit plugins. I think this would get rspec used a lot more. To do this, I'm going to use jRuby to start a ruby script that kicks off the rspec tests. I've written a custom BehaviourRunner that basically substitutes the @options.report for my own version. This way I can see when the tests are starting, stopping, passing, not passing etc. The ruby code will call back to the Java runner and communicate with an RSpecListener. But, my current problem is this: How do you start an rspec test in Ruby? i.e. not from the command line? I've been using this command line to workout where in the ruby code to do the Java callbacks: spec --require j_behaviour_runner.rb --runner JBehaviourRunner bowling_spec.rb and now I need to do this in a ruby script so that I can start it from jRuby. Comments? Oh, and one last (stupid!) question--is there already an eclipse runner out there? Cheers! Raymond Barlow From noreply at rubyforge.org Sun Jun 3 16:38:37 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 16:38:37 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11337 ] autotest runs specs redundantly Message-ID: <20070603203837.215F75240AE2@rubyforge.org> Bugs item #11337, was opened at 2007-06-03 13:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Erik Ostrom (eostrom) Assigned to: Nobody (None) Summary: autotest runs specs redundantly Initial Comment: I'm running autotest 3.6.0 with rspec 2064 on Ruby 1.8.6 and Rails 1.2.3 on Windows XP SP2. When I have a spec with two failing examples, autotest/rspec tries to rerun the spec twice. For example, the command line might look like this: ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb; ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb BTW, this doesn't work on Windows, even after hacking autotest/rspec.rb to honor autotest's new command separator constant, but I think it's an autotest bug (http://rubyforge.org/tracker/index.php?func=detail&aid=11335&group_id=419&atid=1678). The point of THIS bug is, it's running the same spec twice. Or more, if there are more failing examples. I was able to fix this to my satisfaction by changing this line in make_test_cmd in autotest/rspec.rb: return cmds.join('; ') to return cmds.uniq.join('; ') It might be better to compress the set of files before generating the commands, but I don't know the right place to do that. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 From noreply at rubyforge.org Sun Jun 3 17:39:08 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 17:39:08 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070603213908.2F8CE5240AD8@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Nobody (None) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 14:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 17:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 16:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From aslak.hellesoy at gmail.com Sun Jun 3 17:55:28 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Sun, 3 Jun 2007 23:55:28 +0200 Subject: [rspec-devel] rspec runner for eclipse In-Reply-To: <4662F2FC.3040408@raymanoz.com> References: <4662F2FC.3040408@raymanoz.com> Message-ID: <8d961d900706031455v3bf8b051q6dcbdd245b9913f0@mail.gmail.com> On 6/3/07, Raymond Barlow wrote: > Hi guys, > > I'm looking at writing an rspec runner for eclipse like the jUnit and > ruby's TestUnit plugins. I think this would get rspec used a lot more. > > To do this, I'm going to use jRuby to start a ruby script that kicks off > the rspec tests. I've written a custom BehaviourRunner that basically > substitutes the @options.report for my own version. This way I can see > when the tests are starting, stopping, passing, not passing etc. The > ruby code will call back to the Java runner and communicate with an > RSpecListener. > > But, my current problem is this: How do you start an rspec test in Ruby? > i.e. not from the command line? I've been using this command line to > workout where in the ruby code to do the Java callbacks: > spec --require j_behaviour_runner.rb --runner JBehaviourRunner > bowling_spec.rb > > and now I need to do this in a ruby script so that I can start it from > jRuby. > > Comments? > You'll find instructions about IDE integration here: http://rspec.rubyforge.org/documentation/tools/extensions/editors/index.html > Oh, and one last (stupid!) question--is there already an eclipse runner > out there? > There is nothing for Eclipse. I would get in touch with the Aptana people if I were you. Aslak > Cheers! > Raymond Barlow > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Sun Jun 3 19:19:42 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 19:19:42 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070603231942.097565240AD7@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 18:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Jim Morris (wolfmanjm) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 19:19 Message: Fixed in r2075 (hopefully) The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb) Someone please confirm whether this is working or not and I'll close this. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 20:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 19:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Sun Jun 3 20:39:39 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 20:39:39 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070604003940.033405240ABB@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: Accepted Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:39 Message: Just tried doing a "piston import" as well as a plugin install followed by "svn add" and got the same message about "inconsistent newlines" To set the svn:eol-style property across a large number of files, using the following on a Mac or *nix system should do it: find . -name '.svn' -prune -o -type f | \ xargs svn ps svn:eol-style native svn commit NOTE: The above assumes that (1) you're cd'd to the top-level dir of the plugin source and (2) that all files in the plugin are text files. (I took a quick look thru the plugin source and didn't see anything that looked like binary data. ie images, pdf, etc) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 16:19 Message: Fixed in r2075 (hopefully) The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb) Someone please confirm whether this is working or not and I'll close this. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 14:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 17:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 16:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Sun Jun 3 20:47:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 20:47:31 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070604004731.9B52A5240ABB@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Open Resolution: Accepted Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:47 Message: Sorry, the fix you put in with the rake task did work. I got bit by not paying attention to my command history. I was still working with CURRENT rather than trunk. The rake task you put in place did work. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:39 Message: Just tried doing a "piston import" as well as a plugin install followed by "svn add" and got the same message about "inconsistent newlines" To set the svn:eol-style property across a large number of files, using the following on a Mac or *nix system should do it: find . -name '.svn' -prune -o -type f | \ xargs svn ps svn:eol-style native svn commit NOTE: The above assumes that (1) you're cd'd to the top-level dir of the plugin source and (2) that all files in the plugin are text files. (I took a quick look thru the plugin source and didn't see anything that looked like binary data. ie images, pdf, etc) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 16:19 Message: Fixed in r2075 (hopefully) The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb) Someone please confirm whether this is working or not and I'll close this. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 14:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 17:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 16:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Sun Jun 3 21:05:40 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 21:05:40 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070604010540.9E4A45240ABB@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 18:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None >Status: Closed Resolution: Accepted Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 21:05 Message: Thanks for the heads up. I'll close this then :-) ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 20:47 Message: Sorry, the fix you put in with the rake task did work. I got bit by not paying attention to my command history. I was still working with CURRENT rather than trunk. The rake task you put in place did work. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 20:39 Message: Just tried doing a "piston import" as well as a plugin install followed by "svn add" and got the same message about "inconsistent newlines" To set the svn:eol-style property across a large number of files, using the following on a Mac or *nix system should do it: find . -name '.svn' -prune -o -type f | \ xargs svn ps svn:eol-style native svn commit NOTE: The above assumes that (1) you're cd'd to the top-level dir of the plugin source and (2) that all files in the plugin are text files. (I took a quick look thru the plugin source and didn't see anything that looked like binary data. ie images, pdf, etc) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 19:19 Message: Fixed in r2075 (hopefully) The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb) Someone please confirm whether this is working or not and I'll close this. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 20:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 19:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Sun Jun 3 21:38:58 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Jun 2007 21:38:58 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors Message-ID: <20070604013858.EC3125240ABB@rubyforge.org> Bugs item #11296, was opened at 2007-06-01 15:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Accepted Priority: 3 Submitted By: Jim Morris (wolfmanjm) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: svn export gives errors Initial Comment: Trying to import via piston (svn export) there is an inconsistent line ending error... > piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines svn: Inconsistent line ending style /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute' from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10 from /usr/bin/piston:16:in `load' from /usr/bin/piston:16 ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 18:38 Message: Sorry, the fix you put in with the rake task did work. I got bit by not paying attention to my command history. I was still working with CURRENT rather than trunk. The rake task you put in place did work. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 18:05 Message: Thanks for the heads up. I'll close this then :-) ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:47 Message: Sorry, the fix you put in with the rake task did work. I got bit by not paying attention to my command history. I was still working with CURRENT rather than trunk. The rake task you put in place did work. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 17:39 Message: Just tried doing a "piston import" as well as a plugin install followed by "svn add" and got the same message about "inconsistent newlines" To set the svn:eol-style property across a large number of files, using the following on a Mac or *nix system should do it: find . -name '.svn' -prune -o -type f | \ xargs svn ps svn:eol-style native svn commit NOTE: The above assumes that (1) you're cd'd to the top-level dir of the plugin source and (2) that all files in the plugin are text files. (I took a quick look thru the plugin source and didn't see anything that looked like binary data. ie images, pdf, etc) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-03 16:19 Message: Fixed in r2075 (hopefully) The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb) Someone please confirm whether this is working or not and I'll close this. ---------------------------------------------------------------------- Comment By: Rick Tessner (ricktessner) Date: 2007-06-03 14:39 Message: I'm seeing the same error about "inconsistent line ending style" on version.rb. I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads *.rb = svn:eol-style=native It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set. In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file. Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself. The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit. Hope this helps. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-01 17:26 Message: I'm using svn, version 1.4.3 (r23084) on Ubuntu Linux Feisty. piston (1.3.3) It actually checked out ok, but the failure was on the svn add The file vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had DOS style line endings, but was inconsistent, so some \n and some \r\n When I did a dos2unix on the file it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-01 16:28 Message: I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797 From noreply at rubyforge.org Mon Jun 4 00:27:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Jun 2007 00:27:31 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11337 ] autotest runs specs redundantly Message-ID: <20070604042731.543A05240B7C@rubyforge.org> Bugs item #11337, was opened at 2007-06-03 20:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Erik Ostrom (eostrom) >Assigned to: David Chelimsky (dchelimsky) Summary: autotest runs specs redundantly Initial Comment: I'm running autotest 3.6.0 with rspec 2064 on Ruby 1.8.6 and Rails 1.2.3 on Windows XP SP2. When I have a spec with two failing examples, autotest/rspec tries to rerun the spec twice. For example, the command line might look like this: ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb; ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb BTW, this doesn't work on Windows, even after hacking autotest/rspec.rb to honor autotest's new command separator constant, but I think it's an autotest bug (http://rubyforge.org/tracker/index.php?func=detail&aid=11335&group_id=419&atid=1678). The point of THIS bug is, it's running the same spec twice. Or more, if there are more failing examples. I was able to fix this to my satisfaction by changing this line in make_test_cmd in autotest/rspec.rb: return cmds.join('; ') to return cmds.uniq.join('; ') It might be better to compress the set of files before generating the commands, but I don't know the right place to do that. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-04 04:27 Message: Actually it turns out that there is a MUCH easier approach. Fixed in r2076. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 From dan at tastapod.com Mon Jun 4 10:54:50 2007 From: dan at tastapod.com (Dan North) Date: Mon, 04 Jun 2007 15:54:50 +0100 Subject: [rspec-devel] rspec runner for eclipse In-Reply-To: <4662F2FC.3040408@raymanoz.com> References: <4662F2FC.3040408@raymanoz.com> Message-ID: <466427BA.3010109@tastapod.com> I think that would be really sweet. I currently run my "daddy" behaviour file - usually called examples.rb - as a ruby program. Eclipse makes the path names in the stack trace clickable so I can navigate to the source, but a test::unit style plugin would be great. Cheers, Dan Raymond Barlow wrote: > Hi guys, > > I'm looking at writing an rspec runner for eclipse like the jUnit and > ruby's TestUnit plugins. I think this would get rspec used a lot more. > > To do this, I'm going to use jRuby to start a ruby script that kicks off > the rspec tests. I've written a custom BehaviourRunner that basically > substitutes the @options.report for my own version. This way I can see > when the tests are starting, stopping, passing, not passing etc. The > ruby code will call back to the Java runner and communicate with an > RSpecListener. > > But, my current problem is this: How do you start an rspec test in Ruby? > i.e. not from the command line? I've been using this command line to > workout where in the ruby code to do the Java callbacks: > spec --require j_behaviour_runner.rb --runner JBehaviourRunner > bowling_spec.rb > > and now I need to do this in a ruby script so that I can start it from > jRuby. > > Comments? > > Oh, and one last (stupid!) question--is there already an eclipse runner > out there? > > Cheers! > Raymond Barlow > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Mon Jun 4 20:16:13 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Jun 2007 20:16:13 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11337 ] autotest runs specs redundantly Message-ID: <20070605001613.9629852409C6@rubyforge.org> Bugs item #11337, was opened at 2007-06-03 13:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 Category: None Group: None Status: Closed Resolution: Accepted Priority: 3 Submitted By: Erik Ostrom (eostrom) Assigned to: David Chelimsky (dchelimsky) Summary: autotest runs specs redundantly Initial Comment: I'm running autotest 3.6.0 with rspec 2064 on Ruby 1.8.6 and Rails 1.2.3 on Windows XP SP2. When I have a spec with two failing examples, autotest/rspec tries to rerun the spec twice. For example, the command line might look like this: ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb; ruby script/spec -O spec/spec.opts spec/models/comment_spec.rb BTW, this doesn't work on Windows, even after hacking autotest/rspec.rb to honor autotest's new command separator constant, but I think it's an autotest bug (http://rubyforge.org/tracker/index.php?func=detail&aid=11335&group_id=419&atid=1678). The point of THIS bug is, it's running the same spec twice. Or more, if there are more failing examples. I was able to fix this to my satisfaction by changing this line in make_test_cmd in autotest/rspec.rb: return cmds.join('; ') to return cmds.uniq.join('; ') It might be better to compress the set of files before generating the commands, but I don't know the right place to do that. ---------------------------------------------------------------------- >Comment By: Erik Ostrom (eostrom) Date: 2007-06-04 17:16 Message: And that approach solves my command separator problem, too. Thanks! ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-03 21:27 Message: Actually it turns out that there is a MUCH easier approach. Fixed in r2076. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11337&group_id=797 From noreply at rubyforge.org Mon Jun 4 23:15:45 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Jun 2007 23:15:45 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11143 ] Views code for ActionController::Base#render broke between 1.0.0 and 1.0.3 on Rails Edge r6731 Message-ID: <20070605031546.06E8A5240B95@rubyforge.org> Bugs item #11143, was opened at 2007-05-26 00:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11143&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Accepted Priority: 3 Submitted By: Coda Hale (codahale) Assigned to: David Chelimsky (dchelimsky) Summary: Views code for ActionController::Base#render broke between 1.0.0 and 1.0.3 on Rails Edge r6731 Initial Comment: I just updated to Rails r6731 and RSpec 1.0.3, and all my controller specs exploded: 1) ActionView::ActionViewError in 'FavoritesController handling GET /user/1/favorites should be successful' Couldn't find template file for favorites/index in ["/Users/coda/Project/app/views"] /Users/coda/Project/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/controller.rb:70:in `render' /Users/coda/Project/app/controllers/favorites_controller.rb:10:in `index' spec/controllers/favorites_controller_spec.rb:41:in `do_get' spec/controllers/favorites_controller_spec.rb:45: spec/controllers/favorites_controller_spec.rb:31: The view is in app/views/favorites/index.html.erb, and the call to render it is just the default: respond_to do |format| format.html # index.html.erb end The code works fine in development -- renders the right view and everything. This code used to pass with an older revision of Edge and RSpec 1.0.0, and I noticed that Spec::Rails::DSL::ControllerInstanceMethods#render has changed. ---------------------------------------------------------------------- Comment By: Timothy Bennett (lanaer) Date: 2007-06-04 20:15 Message: A somewhat cleaner way to fix it is to add define_method :full_template_path do "fake path generated by rspec" end to ControllerInstanceMethods::render (along side all those other define_methods) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-26 11:23 Message: Fixed in r2041. The problem was two-fold. We recently removed the implicit re-raising (using rescue_action) of errors in controller examples to fix another bug. This had the unfortunate side effect of hiding errors. Additionally, there was a change in rails that caused rspec to fall down in controller examples with isolated views. The rescue_action issue is now resolved by adding a method available in controller examples named "raise_controller_errors". This gets called from the generated spec_helper: config.before(:each, :behaviour_type => :controller) do raise_controller_errors end The render problem is resolved by overriding render_file instead of render_template in Spec::Rails::DSL::ControllerInstanceMethods#render. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-26 08:21 Message: No - that was wrong. Working on it though. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-26 08:01 Message: Making some progress. I was able to duplicate this by defining rescue_action. It turns out that this is due to a change in rails, not the changes in RSpec. Spec::Rails::DSL::ControllerInstanceMethods#render is never being called in the example I've got failing!!!! Still looking. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-26 07:49 Message: Coda, can you post the spec please? I'm not able to reproduce this error. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-26 03:06 Message: David, this is what I mentioned the other day. I haven't found a solution yet. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11143&group_id=797 From noreply at rubyforge.org Tue Jun 5 02:30:55 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 02:30:55 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11223 ] Unable to access flash from rails helper specs Message-ID: <20070605063055.0C6985240BC1@rubyforge.org> Bugs item #11223, was opened at 2007-05-30 01:07 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Josh Knowles (joshknowles) Assigned to: Nobody (None) Summary: Unable to access flash from rails helper specs Initial Comment: The changes made with changeset 2044 to fix issue 11137 appear to have broken the ability to access the flash from helper specs (unless I'm doing something completely wrong...). While I haven't had time to investigate the internals of the TestResponse logic I have attached a failing helper spec (spec/helpers) for the time being. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-04 23:30 Message: I'm using the current release of RSpec 1.0.4 and I cannot access the flash from a helper spec test either. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 From noreply at rubyforge.org Tue Jun 5 08:04:06 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 08:04:06 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11223 ] Unable to access flash from rails helper specs Message-ID: <20070605120406.6832F5240A30@rubyforge.org> Bugs item #11223, was opened at 2007-05-30 08:07 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Josh Knowles (joshknowles) Assigned to: Nobody (None) Summary: Unable to access flash from rails helper specs Initial Comment: The changes made with changeset 2044 to fix issue 11137 appear to have broken the ability to access the flash from helper specs (unless I'm doing something completely wrong...). While I haven't had time to investigate the internals of the TestResponse logic I have attached a failing helper spec (spec/helpers) for the time being. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 12:04 Message: Josh - thanks for pointing right to the revision that broke this! That helped a lot. Fixed in r2078. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-05 06:30 Message: I'm using the current release of RSpec 1.0.4 and I cannot access the flash from a helper spec test either. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 From noreply at rubyforge.org Tue Jun 5 08:04:22 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 08:04:22 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11223 ] Unable to access flash from rails helper specs Message-ID: <20070605120422.52C315240A30@rubyforge.org> Bugs item #11223, was opened at 2007-05-30 08:07 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Josh Knowles (joshknowles) >Assigned to: David Chelimsky (dchelimsky) Summary: Unable to access flash from rails helper specs Initial Comment: The changes made with changeset 2044 to fix issue 11137 appear to have broken the ability to access the flash from helper specs (unless I'm doing something completely wrong...). While I haven't had time to investigate the internals of the TestResponse logic I have attached a failing helper spec (spec/helpers) for the time being. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 12:04 Message: Josh - thanks for pointing right to the revision that broke this! That helped a lot. Fixed in r2078. ---------------------------------------------------------------------- Comment By: Jim Morris (wolfmanjm) Date: 2007-06-05 06:30 Message: I'm using the current release of RSpec 1.0.4 and I cannot access the flash from a helper spec test either. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11223&group_id=797 From noreply at rubyforge.org Tue Jun 5 08:52:30 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 08:52:30 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-10534 ] Windows: undefined method `controller_name' Message-ID: <20070605125230.3CC1D5240A23@rubyforge.org> Bugs item #10534, was opened at 2007-05-02 23:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10534&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Larry Kluger (larrykluger) Assigned to: Nobody (None) Summary: Windows: undefined method `controller_name' Initial Comment: Running 0.9.1 on windows -- (InstantRails with updated rails and other gems) gives following trace (below). I have updated to all the latest gems and plugins as of today, May 2, 07. The exact same svn tree on Linux works fine for rake spec I think something is not requiring the right modules due to Window's back slashes. Regards, LarryK ~~~~~~~~~~~~~~~ Trace followed by list of installed gems > rake spec C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:4 from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:47:in `class_eval' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:47:in `eval_behaviour' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:29:in `initialize' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec /dsl/behaviour_factory.rb:43:in `new' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec /dsl/behaviour_factory.rb:43:in `create' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/extensions/kernel.rb:4:in `context' from ./spec/controllers/session_controller_spec.rb:3 ... 14 levels... from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/option_parser.rb:261:in `parse' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/option_parser.rb:28:in `create_behaviour_runner' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/command_line.rb:14:in `run' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/bin/spec:3 rake aborted! Command ruby -I"C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib" "C:/i nstant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/bin/spec" "spec/controllers/se ssion_controller_spec.rb" "spec/controllers/users_controller_spec.rb" "spec/controllers/user_assets_ controller_spec.rb" "spec/helpers/user_assets_helper_spec.rb" "spec/helpers/user_assets_url_helpers_ spec.rb" "spec/models/asset_spec.rb" "spec/models/authenticated_base_spec.rb" "spec/models/user_spec .rb" "spec/views/assets/edit_rhtml_spec.rb" "spec/views/assets/index_rhtml_spec.rb" "spec/views/asse ts/new_rhtml_spec.rb" "spec/views/assets/show_rhtml_spec.rb" "spec/views/users/edit_rhtml_spec.rb" " spec/views/users/index_rhtml_spec.rb" "spec/views/users/new_rhtml_spec.rb" "spec/views/users/show_rh tml_spec.rb" --options "C:/instant_rails_1.7/InstantRails/rails_apps/am2/config/../spec/spec.opts" failed C:\instant_rails_1.7\InstantRails\rails_apps\am2>gem list --local *** LOCAL GEMS *** actionmailer (1.3.3) Service layer for easy email delivery and testing. actionpack (1.13.3) Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.2.3) Web service support for Action Pack. activerecord (1.15.3) Implements the ActiveRecord pattern for ORM. activesupport (1.4.2) Support and utility classes used by the Rails framework. capistrano (1.4.1) Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications. cgi_multipart_eof_fix (2.1) Fix an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5 when multipart boundary attribute contains a non-halting regular expression string. cmdparse (2.0.2) Advanced command line parser supporting commands fxri (0.3.6) Graphical interface to the RI documentation, with search engine. fxruby (1.6.6) FXRuby is the Ruby binding to the FOX GUI toolkit. gem_plugin (0.2.2) A plugin system based only on rubygems that uses dependencies only highline (1.2.7) HighLine is a high-level command-line IO library. hpricot (0.4) a swift, liberal HTML parser with a fantastic library log4r (1.0.5) Log4r is a comprehensive and flexible logging library for Ruby. mongrel (1.0.1) A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. mongrel_cluster (0.2.1) Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes. mysql (2.7.3) A win32-native build of the MySQL API module for Ruby. needle (1.3.0) Needle is a Dependency Injection/Inversion of Control container for Ruby. It supports both type-2 (setter) and type-3 (constructor) injection. It takes advantage of the dynamic nature of Ruby to provide a rich and flexible approach to injecting dependencies. net-sftp (1.1.0) Net::SFTP is a pure-Ruby implementation of the SFTP client protocol. net-ssh (1.0.10) Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. piston (1.3.3) Piston is a utility that enables merge tracking of remote repositories. rails (1.2.3) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.2) Ruby based make-like utility. rcov (0.8.0.2) Code coverage analysis tool for Ruby rmagick (1.14.1) RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries. rspec (0.9.1, 0.8.2) RSpec-0.9.1 (r1880) - BDD for Ruby http://rspec.rubyforge.org/ sources (0.0.1) This package provides download sources for remote gem installation win32-clipboard (0.4.1) A package for interacting with the Windows clipboard win32-dir (0.3.1) Extra constants and methods for the Dir class on Windows. win32-eventlog (0.4.3) Interface for the MS Windows Event Log. win32-file (0.5.3) Extra or redefined methods for the File class on Windows. win32-file-stat (1.2.3) A File::Stat class tailored to MS Windows win32-process (0.5.1) Adds fork, wait, wait2, waitpid, waitpid2 and a special kill method win32-sapi (0.1.3) An interface to the MS SAPI (Sound API) library. win32-sound (0.4.0) A package for playing with sound on Windows. win32console (1.0.8) A library giving the Win32 console ANSI escape sequence support. windows-pr (0.6.2) Windows functions and constants predefined via Win32API ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 12:52 Message: Larry - things have moved around a bit since this was raised. Are you still experiencing the same thing with 1.0.x? ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-10 01:20 Message: Hi David, nil seems a bit boring. Please let me know how I can further help track this down. I'm at your service. Larry Source: def create(*args, &block) opts = Hash === args.last ? args.last : {} require 'pp' puts pp(opts) if opts[:shared] key = :default .... result: C:\instant_rails_1.7\InstantRails\rails_apps\am2>ruby script/spec spec/controllers/session_controlle r_spec.rb /config/../vendor/plugins/acts_as_wizard/lib/wizard_setup_filter.rb:2) {} nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:6 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `class_eval' .... ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-09 22:44 Message: Hi Larry - what I'm looking for is not the args, but the options: puts opts.inspect or puts pp(opts) Thanks ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-06 20:22 Message: Hi, I changed behaviour_factory.rb to be: def create(*args, &block) opts = Hash === args.last ? args.last : {} require 'pp' puts pp(args) if opts[:shared] .... Here is the output: ["/session/new GET"] nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb :95:in `method_missing': undefined method `controller_name' for # ( NoMethodError) .... Larry ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-06 20:13 Message: Hi David, I've deleted the rspec gem and plugin. I then installed ver 0.9.3 as plugins per the installation instructions. I added the puts as requested the result was nil, see trace. Aslak, where do I put the lines describe MyController, :behaviour_type => :controller do end ? I tried describe "SessionController", :behaviour_type => :controller do end just after the require statement in my session_controller_spec.rb but received the same problem. Thank you for your help and time on this puzzler. Larry C:\instant_rails_1.7\InstantRails\rails_apps\am2>ruby script/spec spec/controllers/session_controller_spec.rb nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:4 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `class_eval' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `eval_behaviour' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:29:in `initialize' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec/dsl/behaviour_factory.rb:44:in `new' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec/dsl/behaviour_factory.rb:44:in `create' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/extensions/kernel.rb:4:in `context' from ./spec/controllers/session_controller_spec.rb:3 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load_specs' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `each' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `load_specs' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:22:in `run' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/command_line.rb:17:in `run' from script/spec:4 C:\instant_rails_1.7\InstantRails\rails_apps\am2> ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-06 11:52 Message: "However, I think maybe the call to caller might yield slightly different values on Windows and Linux/OS X." Now THAT would make sense. Larry, would you kindly apply the patch below, run `script/spec spec/controllers/session_controller_spec.rb` and show us the output? Thanks Index: rspec_on_rails/lib/spec/dsl/behaviour_factory.rb =================================================================== --- rspec_on_rails/lib/spec/dsl/behaviour_factory.rb (revision 1893) +++ rspec_on_rails/lib/spec/dsl/behaviour_factory.rb (working copy) @@ -31,6 +31,7 @@ # describe "name", :behaviour_type => :view ... def create(*args, &block) opts = Hash === args.last ? args.last : {} + puts opts[:spec_path] if opts[:shared] key = :default elsif opts[:behaviour_type] ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 11:44 Message: There shouldn't be any need to support Windows style paths with \. Ruby will always report forward slashes for paths, even on Windows. I don't think Regexp support is different on Windows either, that would never slip through the Ruby community. However, I think maybe the call to caller might yield slightly different values on Windows and Linux/OS X. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-06 11:12 Message: Here's the regexp used to determine the path: /spec(\/|\)+(view|helper|controller|model)s/ The (\/|\) is there to support /unix/style and \windows\style paths. This used be to expressed in 4 separate regexps and this release merged them into one. The specs that describe windows style paths still pass, but I'm running them on *nix. Could there be a difference in the way windows is handling regexps? Also, please try this one windows as well: script/spec spec/controllers/session_controller_spec.rb and let us know if you get the same result. Thanks, David ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 10:24 Message: I think the source of this bug is in rspec_on_rails/lib/spec/rails/extensions/kernel.rb This is where Spec::Rails tries to guess what kind of spec this is. Perhaps this behaves differently on windows? Could you investigate this please? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 10:10 Message: Hint: Spec::Rails mixes in different modules for specs depending on whether it thinks it is a model spec, controller spec, view spec or helper spec. Your error tells me that the controller mixin wasn't included. RSpec decides what to mix in by looking at the folder of your spec. If it's under spec/controllers this should happen automatically (and apparently this is buggy on windows). Just to verify this theory (and work around it until a fix has been committed), you could try to be explicit about it: describe MyController, :behaviour_type => :controller do end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10534&group_id=797 From webs.dev at gmail.com Tue Jun 5 10:23:06 2007 From: webs.dev at gmail.com (greg weber) Date: Tue, 5 Jun 2007 09:23:06 -0500 Subject: [rspec-devel] in source unit testing Message-ID: After spending a little time programming in D (which has built-in support for unittests and contracts), I got to like placing unittests directly in the source code instead of in a seperate file. I have created a similiar implementation that uses rspec. This is especially nice for testing module functions or class methods- methods that do not maintain state, and thus do not require different context setups, or classes that have very minimal state. It can also be nice to use when first starting to code. To use, simply surround the rspec 'it' method in a unittest{} block. The unittest block will only be ran when using rspec. The context is automatically recorded as self, and the method is automatically recorded as part of the specification. require 'unittest' module Query def Query.compile_queries( queries ) ('(?:' << queries.join(')|(?:') << ')').map { |q| Regexp.compile q } end unittest{ it "should compile regular expressions" do compile_queries(["foo"]).should == [/(?:foo)/] compile_queries(["foo","BAR"]).should == [/(?:foo)|(?:BAR)/] end } end The output from spec -f s Query - compile_queries should compile regular expressions For distribution of the file without the unittest dependency: begin require "unittest" rescue LoadError # for sure no unit testing def unittest; end end Is there interest in adding this to rspec? Attached is the implementation code. -Greg Weber -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070605/c9a4da56/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: unittester.rb Type: application/x-ruby Size: 2258 bytes Desc: not available Url : http://rubyforge.org/pipermail/rspec-devel/attachments/20070605/c9a4da56/attachment.bin From noreply at rubyforge.org Tue Jun 5 18:00:36 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 18:00:36 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10814 ] Runner loads shared code, test cases require them again Message-ID: <20070605220036.E81F05240A4C@rubyforge.org> Feature Requests item #10814, was opened at 2007-05-13 19:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 Category: runner / command line Group: None Status: Closed Priority: 3 Submitted By: Assaf Arkin (assaf) Assigned to: David Chelimsky (dchelimsky) Summary: Runner loads shared code, test cases require them again Initial Comment: Our test directory contains one file that provides methods and behaviores shared by all other test files. To run individual files, each one requires that shared file. However, when running spec test, RSpec loads all the files from the test directory (and its sub-directories). So the file gets loaded once (by RSpec) and required once (by the test files), and interpreted twice (by Ruby). Some of the code doesn't like that. The current workaround is to detect the second load and ignore it (e.g. unless defined?(SomeConst)). But given the amount of time it took to find the culprit and work around it, can RSpec require the file instead, or allow a directory of shared behaviors not loaded by default? ---------------------------------------------------------------------- Comment By: Patrick Ritchie (pritchie) Date: 2007-06-05 18:00 Message: Reason: load is required for spec_server (drb) to work correctly. If we use require the behaviours only get checked on the first run of a given spec file. On subsequent runs we get the behaviours don't get loaded causing this problem: http://rubyforge.org/pipermail/rspec-users/2007-May/001633.html ---------------------------------------------------------------------- Comment By: Assaf Arkin (assaf) Date: 2007-05-16 01:00 Message: Thanks! Assaf ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-15 23:35 Message: No reason. Fixed in r1958. ---------------------------------------------------------------------- Comment By: Assaf Arkin (assaf) Date: 2007-05-15 22:21 Message: More pain than it's worth. I'm going to have to explain to every developer how to properly run the test cases, they're of course not going to RTFM, so their first attempt will fail miserably. And with each project deciding to exclude a different file ... Is there a particular reason for RSpec to use load instead of require? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-15 20:35 Message: How about an "exclude" command line option? spec spec --exclude spec/shared.rb ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 From noreply at rubyforge.org Tue Jun 5 18:16:04 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 18:16:04 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10814 ] Runner loads shared code, test cases require them again Message-ID: <20070605221605.065865240A58@rubyforge.org> Feature Requests item #10814, was opened at 2007-05-13 23:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 Category: runner / command line Group: None >Status: Open Priority: 3 Submitted By: Assaf Arkin (assaf) Assigned to: David Chelimsky (dchelimsky) Summary: Runner loads shared code, test cases require them again Initial Comment: Our test directory contains one file that provides methods and behaviores shared by all other test files. To run individual files, each one requires that shared file. However, when running spec test, RSpec loads all the files from the test directory (and its sub-directories). So the file gets loaded once (by RSpec) and required once (by the test files), and interpreted twice (by Ruby). Some of the code doesn't like that. The current workaround is to detect the second load and ignore it (e.g. unless defined?(SomeConst)). But given the amount of time it took to find the culprit and work around it, can RSpec require the file instead, or allow a directory of shared behaviors not loaded by default? ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 22:16 Message: Unfortunately, I'm going to have to revert this - this fix broke drb. We'll have to find a different solution. ---------------------------------------------------------------------- Comment By: Patrick Ritchie (pritchie) Date: 2007-06-05 22:00 Message: Reason: load is required for spec_server (drb) to work correctly. If we use require the behaviours only get checked on the first run of a given spec file. On subsequent runs we get the behaviours don't get loaded causing this problem: http://rubyforge.org/pipermail/rspec-users/2007-May/001633.html ---------------------------------------------------------------------- Comment By: Assaf Arkin (assaf) Date: 2007-05-16 05:00 Message: Thanks! Assaf ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-16 03:35 Message: No reason. Fixed in r1958. ---------------------------------------------------------------------- Comment By: Assaf Arkin (assaf) Date: 2007-05-16 02:21 Message: More pain than it's worth. I'm going to have to explain to every developer how to properly run the test cases, they're of course not going to RTFM, so their first attempt will fail miserably. And with each project deciding to exclude a different file ... Is there a particular reason for RSpec to use load instead of require? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-16 00:35 Message: How about an "exclude" command line option? spec spec --exclude spec/shared.rb ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 From noreply at rubyforge.org Tue Jun 5 18:33:55 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 18:33:55 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11378 ] fix to 10814 broke drb Message-ID: <20070605223355.9F1D65240A51@rubyforge.org> Bugs item #11378, was opened at 2007-06-05 22:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11378&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: fix to 10814 broke drb Initial Comment: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11378&group_id=797 From noreply at rubyforge.org Tue Jun 5 18:36:43 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 18:36:43 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-11378 ] fix to 10814 broke drb Message-ID: <20070605223643.71B6A5240A51@rubyforge.org> Bugs item #11378, was opened at 2007-06-05 22:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11378&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: fix to 10814 broke drb Initial Comment: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 22:36 Message: Fixed in r2081 Changed behaviour_runner to load files rather than require them so that drb would work. Note that this leaves http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797 open and needing a new solution. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11378&group_id=797 From noreply at rubyforge.org Tue Jun 5 18:49:56 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 18:49:56 -0400 (EDT) Subject: [rspec-devel] [ rspec-Bugs-10534 ] Windows: undefined method `controller_name' Message-ID: <20070605224957.1BB08A970002@rubyforge.org> Bugs item #10534, was opened at 2007-05-02 19:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10534&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Larry Kluger (larrykluger) Assigned to: Nobody (None) Summary: Windows: undefined method `controller_name' Initial Comment: Running 0.9.1 on windows -- (InstantRails with updated rails and other gems) gives following trace (below). I have updated to all the latest gems and plugins as of today, May 2, 07. The exact same svn tree on Linux works fine for rake spec I think something is not requiring the right modules due to Window's back slashes. Regards, LarryK ~~~~~~~~~~~~~~~ Trace followed by list of installed gems > rake spec C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:4 from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:47:in `class_eval' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:47:in `eval_behaviour' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/dsl/ behaviour.rb:29:in `initialize' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec /dsl/behaviour_factory.rb:43:in `new' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec /dsl/behaviour_factory.rb:43:in `create' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/extensions/kernel.rb:4:in `context' from ./spec/controllers/session_controller_spec.rb:3 ... 14 levels... from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/option_parser.rb:261:in `parse' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/option_parser.rb:28:in `create_behaviour_runner' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib/spec/runn er/command_line.rb:14:in `run' from C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/bin/spec:3 rake aborted! Command ruby -I"C:/instant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/lib" "C:/i nstant_rails_1.7/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.9.1/bin/spec" "spec/controllers/se ssion_controller_spec.rb" "spec/controllers/users_controller_spec.rb" "spec/controllers/user_assets_ controller_spec.rb" "spec/helpers/user_assets_helper_spec.rb" "spec/helpers/user_assets_url_helpers_ spec.rb" "spec/models/asset_spec.rb" "spec/models/authenticated_base_spec.rb" "spec/models/user_spec .rb" "spec/views/assets/edit_rhtml_spec.rb" "spec/views/assets/index_rhtml_spec.rb" "spec/views/asse ts/new_rhtml_spec.rb" "spec/views/assets/show_rhtml_spec.rb" "spec/views/users/edit_rhtml_spec.rb" " spec/views/users/index_rhtml_spec.rb" "spec/views/users/new_rhtml_spec.rb" "spec/views/users/show_rh tml_spec.rb" --options "C:/instant_rails_1.7/InstantRails/rails_apps/am2/config/../spec/spec.opts" failed C:\instant_rails_1.7\InstantRails\rails_apps\am2>gem list --local *** LOCAL GEMS *** actionmailer (1.3.3) Service layer for easy email delivery and testing. actionpack (1.13.3) Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.2.3) Web service support for Action Pack. activerecord (1.15.3) Implements the ActiveRecord pattern for ORM. activesupport (1.4.2) Support and utility classes used by the Rails framework. capistrano (1.4.1) Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications. cgi_multipart_eof_fix (2.1) Fix an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5 when multipart boundary attribute contains a non-halting regular expression string. cmdparse (2.0.2) Advanced command line parser supporting commands fxri (0.3.6) Graphical interface to the RI documentation, with search engine. fxruby (1.6.6) FXRuby is the Ruby binding to the FOX GUI toolkit. gem_plugin (0.2.2) A plugin system based only on rubygems that uses dependencies only highline (1.2.7) HighLine is a high-level command-line IO library. hpricot (0.4) a swift, liberal HTML parser with a fantastic library log4r (1.0.5) Log4r is a comprehensive and flexible logging library for Ruby. mongrel (1.0.1) A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. mongrel_cluster (0.2.1) Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes. mysql (2.7.3) A win32-native build of the MySQL API module for Ruby. needle (1.3.0) Needle is a Dependency Injection/Inversion of Control container for Ruby. It supports both type-2 (setter) and type-3 (constructor) injection. It takes advantage of the dynamic nature of Ruby to provide a rich and flexible approach to injecting dependencies. net-sftp (1.1.0) Net::SFTP is a pure-Ruby implementation of the SFTP client protocol. net-ssh (1.0.10) Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. piston (1.3.3) Piston is a utility that enables merge tracking of remote repositories. rails (1.2.3) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.2) Ruby based make-like utility. rcov (0.8.0.2) Code coverage analysis tool for Ruby rmagick (1.14.1) RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries. rspec (0.9.1, 0.8.2) RSpec-0.9.1 (r1880) - BDD for Ruby http://rspec.rubyforge.org/ sources (0.0.1) This package provides download sources for remote gem installation win32-clipboard (0.4.1) A package for interacting with the Windows clipboard win32-dir (0.3.1) Extra constants and methods for the Dir class on Windows. win32-eventlog (0.4.3) Interface for the MS Windows Event Log. win32-file (0.5.3) Extra or redefined methods for the File class on Windows. win32-file-stat (1.2.3) A File::Stat class tailored to MS Windows win32-process (0.5.1) Adds fork, wait, wait2, waitpid, waitpid2 and a special kill method win32-sapi (0.1.3) An interface to the MS SAPI (Sound API) library. win32-sound (0.4.0) A package for playing with sound on Windows. win32console (1.0.8) A library giving the Win32 console ANSI escape sequence support. windows-pr (0.6.2) Windows functions and constants predefined via Win32API ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-06-05 18:49 Message: And what's the file path of the spec? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-06-05 08:52 Message: Larry - things have moved around a bit since this was raised. Are you still experiencing the same thing with 1.0.x? ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-09 21:20 Message: Hi David, nil seems a bit boring. Please let me know how I can further help track this down. I'm at your service. Larry Source: def create(*args, &block) opts = Hash === args.last ? args.last : {} require 'pp' puts pp(opts) if opts[:shared] key = :default .... result: C:\instant_rails_1.7\InstantRails\rails_apps\am2>ruby script/spec spec/controllers/session_controlle r_spec.rb /config/../vendor/plugins/acts_as_wizard/lib/wizard_setup_filter.rb:2) {} nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:6 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `class_eval' .... ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-09 18:44 Message: Hi Larry - what I'm looking for is not the args, but the options: puts opts.inspect or puts pp(opts) Thanks ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-06 16:22 Message: Hi, I changed behaviour_factory.rb to be: def create(*args, &block) opts = Hash === args.last ? args.last : {} require 'pp' puts pp(args) if opts[:shared] .... Here is the output: ["/session/new GET"] nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb :95:in `method_missing': undefined method `controller_name' for # ( NoMethodError) .... Larry ---------------------------------------------------------------------- Comment By: Larry Kluger (larrykluger) Date: 2007-05-06 16:13 Message: Hi David, I've deleted the rspec gem and plugin. I then installed ver 0.9.3 as plugins per the installation instructions. I added the puts as requested the result was nil, see trace. Aslak, where do I put the lines describe MyController, :behaviour_type => :controller do end ? I tried describe "SessionController", :behaviour_type => :controller do end just after the require statement in my session_controller_spec.rb but received the same problem. Thank you for your help and time on this puzzler. Larry C:\instant_rails_1.7\InstantRails\rails_apps\am2>ruby script/spec spec/controllers/session_controller_spec.rb nil C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:95:in `method_missing': undefined method `controller_name' for # (NoMethodError) from ./spec/controllers/session_controller_spec.rb:4 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `class_eval' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:47:in `eval_behaviour' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:29:in `initialize' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec/dsl/behaviour_factory.rb:44:in `new' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec_on_rails/lib/spec/dsl/behaviour_factory.rb:44:in `create' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/extensions/kernel.rb:4:in `context' from ./spec/controllers/session_controller_spec.rb:3 from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load_specs' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `each' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `load_specs' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:22:in `run' from C:/instant_rails_1.7/InstantRails/rails_apps/am2/vendor/plugins/rspec/lib/spec/runner/command_line.rb:17:in `run' from script/spec:4 C:\instant_rails_1.7\InstantRails\rails_apps\am2> ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-06 07:52 Message: "However, I think maybe the call to caller might yield slightly different values on Windows and Linux/OS X." Now THAT would make sense. Larry, would you kindly apply the patch below, run `script/spec spec/controllers/session_controller_spec.rb` and show us the output? Thanks Index: rspec_on_rails/lib/spec/dsl/behaviour_factory.rb =================================================================== --- rspec_on_rails/lib/spec/dsl/behaviour_factory.rb (revision 1893) +++ rspec_on_rails/lib/spec/dsl/behaviour_factory.rb (working copy) @@ -31,6 +31,7 @@ # describe "name", :behaviour_type => :view ... def create(*args, &block) opts = Hash === args.last ? args.last : {} + puts opts[:spec_path] if opts[:shared] key = :default elsif opts[:behaviour_type] ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 07:44 Message: There shouldn't be any need to support Windows style paths with \. Ruby will always report forward slashes for paths, even on Windows. I don't think Regexp support is different on Windows either, that would never slip through the Ruby community. However, I think maybe the call to caller might yield slightly different values on Windows and Linux/OS X. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2007-05-06 07:12 Message: Here's the regexp used to determine the path: /spec(\/|\)+(view|helper|controller|model)s/ The (\/|\) is there to support /unix/style and \windows\style paths. This used be to expressed in 4 separate regexps and this release merged them into one. The specs that describe windows style paths still pass, but I'm running them on *nix. Could there be a difference in the way windows is handling regexps? Also, please try this one windows as well: script/spec spec/controllers/session_controller_spec.rb and let us know if you get the same result. Thanks, David ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 06:24 Message: I think the source of this bug is in rspec_on_rails/lib/spec/rails/extensions/kernel.rb This is where Spec::Rails tries to guess what kind of spec this is. Perhaps this behaves differently on windows? Could you investigate this please? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-05-06 06:10 Message: Hint: Spec::Rails mixes in different modules for specs depending on whether it thinks it is a model spec, controller spec, view spec or helper spec. Your error tells me that the controller mixin wasn't included. RSpec decides what to mix in by looking at the folder of your spec. If it's under spec/controllers this should happen automatically (and apparently this is buggy on windows). Just to verify this theory (and work around it until a fix has been committed), you could try to be explicit about it: describe MyController, :behaviour_type => :controller do end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10534&group_id=797 From noreply at rubyforge.org Tue Jun 5 19:44:01 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Jun 2007 19:44:01 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-11379 ] Add a Text Formatter that Show failures right away (as they come up) Message-ID: <20070605234401.805F85240A5E@rubyforge.org> Feature Requests item #11379, was opened at 2007-06-05 16:44 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=11379&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Add a Text Formatter that Show failures right away (as they come up) Initial Comment: This is useful for suites that take a long time to run (> 30 seconds). The advantage is the developer can investigate the error right away instead of waiting for the suite run to finish. This can be used in conjunction with the ProgressBarFormatter. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=11379&group_id=797 From dsisnero at gmail.com Tue Jun 5 20:47:34 2007 From: dsisnero at gmail.com (Dominic Sisneros) Date: Tue, 5 Jun 2007 18:47:34 -0600 Subject: [rspec-devel] [ rspec-Bugs-10534 ] Windows: undefined method `controller_name' In-Reply-To: <20070605224957.1BB08A970002@rubyforge.org> References: <20070605224957.1BB08A970002@rubyforge.org> Message-ID: I am getting similar errors on Windows. running ruby-debug 29 elsif opts[:behaviour_type] 30 behaviour_type = opts[:behaviour_type] 31 elsif opts[:spec_path] =~ /spec\/(#{BEHAVIOUR_CLASSES.keys.join('|')})/ 32 behaviour_type = $1.to_sym 33 else 34 behaviour_type = :default 35 end 36 return BEHAVIOUR_CLASSES[behaviour_type].new(*args, &block) 37 end 38 and (rdb:1) eval opts {:spec_path=>"./spec\\controllers\\cart_controller_spec.rb:30"} so the behaviour_type gets set to :default -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070605/79ae45ec/attachment.html From noreply at rubyforge.org Wed Jun 6 00:22:21 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 6 Jun 2007 00:22:21 -0400 (EDT) Subject: [rspec-devel] [ rspec-Feature Requests-10814 ] Runner loads shared code, test cases require them again Message-ID: <20070606042221.2A6D85240BED@rubyforge.org> Feature Requests item #10814, was opened