Hardbap
2007-Aug-18 14:16 UTC
RSpec: "--color" not working in spec.opts when combined with "--drb"
Windows XP SP 2 ruby 1.8.5 gems: rails 1.2.3 rake 0.7.3 win32console 1.0.8 plugins: rspec 1.0.8 rspec_rails 1.0.8 spec.opts: --colour --format progress --loadby mtime --reverse --drb When I run "rake spec" or "ruby script/spec spec --color" this is the output: D:\dev\project>rake spec (in D:/dev/project) ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m ←[32m.←[0m←[32m.←[0m←[32m.←[0m Finished in 0.172 seconds ←[32m11 examples, 0 failures←[0m If I remove "--drb" from the spec.opts file it runs fine (but slower). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rich
2007-Aug-18 23:18 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
I''m having the same problem. Also, "rake spec" doesn''t connect to my running spec_server, but "ruby script/spec spec/models --drb" does. Do you have that this problem too? I''m running: Vista ruby 1.8.6 rails 1.2.3 rake 0.7.3 win32console 1.0.8 rspec 1.0.8. same spec.opts On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Windows XP SP 2 > ruby 1.8.5 > > gems: > rails 1.2.3 > rake 0.7.3 > win32console 1.0.8 > > plugins:rspec1.0.8 > rspec_rails 1.0.8 > > spec.opts: > --colour > --format > progress > --loadby > mtime > --reverse > --drb > > When I run "rake spec" or "ruby script/spec spec --color" this is the > output: > > D:\dev\project>rake spec > (in D:/dev/project) > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > Finished in 0.172 seconds > > ←[32m11 examples, 0 failures←[0m > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hardbap
2007-Aug-20 13:29 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
I''m not having an issue with "rake spec" not connecting to spec_sever. Could it be an issue with Vista? On Aug 18, 7:18 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m having the same problem. Also, "rake spec" doesn''t connect to my > running spec_server, but "ruby script/spec spec/models --drb" does. Do > you have that this problem too? > > I''m running: > Vista > ruby 1.8.6 > rails 1.2.3 > rake 0.7.3 > win32console 1.0.8 > rspec 1.0.8. > same spec.opts > > On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Windows XP SP 2 > > ruby 1.8.5 > > > gems: > > rails 1.2.3 > > rake 0.7.3 > > win32console 1.0.8 > > > plugins:rspec1.0.8 > > rspec_rails 1.0.8 > > > spec.opts: > > --colour > > --format > > progress > > --loadby > > mtime > > --reverse > > --drb > > > When I run "rake spec" or "ruby script/spec spec --color" this is the > > output: > > > D:\dev\project>rake spec > > (in D:/dev/project) > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > Finished in 0.172 seconds > > > ←[32m11 examples, 0 failures←[0m > > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rich
2007-Aug-20 20:20 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
Ok disregard the rake spec not connecting to spec_server thing - I wasn''t using it properly. I found a workaround to get colour and drb working together: Add "require ''Win32/Console/ANSI''" before the last line in your spec file and change the STDOUT parameter in the last line to $stdout. So <project>/script/spec should look like this: #!/usr/bin/env ruby $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../ vendor/plugins/rspec/lib")) require ''spec'' require ''Win32/Console/ANSI'' ::Spec::Runner::CommandLine.run(ARGV, STDERR, $stdout, true, true) It''s not perfect. The first run will print the output to the console that spec_server is running in. All subsequent runs will print to the correct console though. I couldn''t figure out why it was doing this but the way it works is good enough for me. On Aug 20, 9:29 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not having an issue with "rake spec" not connecting to > spec_sever. > > Could it be an issue with Vista? > > On Aug 18, 7:18 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m having the same problem. Also, "rake spec" doesn''t connect to my > > running spec_server, but "ruby script/spec spec/models --drb" does. Do > > you have that this problem too? > > > I''m running: > > Vista > > ruby 1.8.6 > > rails 1.2.3 > > rake 0.7.3 > > win32console 1.0.8 > > rspec 1.0.8. > > same spec.opts > > > On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Windows XP SP 2 > > > ruby 1.8.5 > > > > gems: > > > rails 1.2.3 > > > rake 0.7.3 > > > win32console 1.0.8 > > > > plugins:rspec1.0.8 > > > rspec_rails 1.0.8 > > > > spec.opts: > > > --colour > > > --format > > > progress > > > --loadby > > > mtime > > > --reverse > > > --drb > > > > When I run "rake spec" or "ruby script/spec spec --color" this is the > > > output: > > > > D:\dev\project>rake spec > > > (in D:/dev/project) > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > Finished in 0.172 seconds > > > > ←[32m11 examples, 0 failures←[0m > > > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hardbap
2007-Aug-21 12:44 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
It worked perfectly! Thank you Rich. On Aug 20, 4:20 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok disregard the rake spec not connecting to spec_server thing - I > wasn''t using it properly. > > I found a workaround to get colour and drb working together: > > Add "require ''Win32/Console/ANSI''" before the last line in your spec > file and change the STDOUT parameter in the last line to $stdout. > > So <project>/script/spec should look like this: > > #!/usr/bin/env ruby > $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../ > vendor/plugins/rspec/lib")) > require ''spec'' > require ''Win32/Console/ANSI'' > ::Spec::Runner::CommandLine.run(ARGV, STDERR, $stdout, true, true) > > It''s not perfect. The first run will print the output to the console > that spec_server is running in. All subsequent runs will print to the > correct console though. I couldn''t figure out why it was doing this > but the way it works is good enough for me. > > On Aug 20, 9:29 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m not having an issue with "rake spec" not connecting to > > spec_sever. > > > Could it be an issue with Vista? > > > On Aug 18, 7:18 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I''m having the same problem. Also, "rake spec" doesn''t connect to my > > > running spec_server, but "ruby script/spec spec/models --drb" does. Do > > > you have that this problem too? > > > > I''m running: > > > Vista > > > ruby 1.8.6 > > > rails 1.2.3 > > > rake 0.7.3 > > > win32console 1.0.8 > > > rspec 1.0.8. > > > same spec.opts > > > > On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Windows XP SP 2 > > > > ruby 1.8.5 > > > > > gems: > > > > rails 1.2.3 > > > > rake 0.7.3 > > > > win32console 1.0.8 > > > > > plugins:rspec1.0.8 > > > > rspec_rails 1.0.8 > > > > > spec.opts: > > > > --colour > > > > --format > > > > progress > > > > --loadby > > > > mtime > > > > --reverse > > > > --drb > > > > > When I run "rake spec" or "ruby script/spec spec --color" this is the > > > > output: > > > > > D:\dev\project>rake spec > > > > (in D:/dev/project) > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > > Finished in 0.172 seconds > > > > > ←[32m11 examples, 0 failures←[0m > > > > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hardbap
2007-Aug-21 13:15 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
I did notice that this fix will suppress any output when using autotest. On Aug 20, 4:20 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok disregard the rake spec not connecting to spec_server thing - I > wasn''t using it properly. > > I found a workaround to get colour and drb working together: > > Add "require ''Win32/Console/ANSI''" before the last line in your spec > file and change the STDOUT parameter in the last line to $stdout. > > So <project>/script/spec should look like this: > > #!/usr/bin/env ruby > $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../ > vendor/plugins/rspec/lib")) > require ''spec'' > require ''Win32/Console/ANSI'' > ::Spec::Runner::CommandLine.run(ARGV, STDERR, $stdout, true, true) > > It''s not perfect. The first run will print the output to the console > that spec_server is running in. All subsequent runs will print to the > correct console though. I couldn''t figure out why it was doing this > but the way it works is good enough for me. > > On Aug 20, 9:29 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m not having an issue with "rake spec" not connecting to > > spec_sever. > > > Could it be an issue with Vista? > > > On Aug 18, 7:18 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I''m having the same problem. Also, "rake spec" doesn''t connect to my > > > running spec_server, but "ruby script/spec spec/models --drb" does. Do > > > you have that this problem too? > > > > I''m running: > > > Vista > > > ruby 1.8.6 > > > rails 1.2.3 > > > rake 0.7.3 > > > win32console 1.0.8 > > > rspec 1.0.8. > > > same spec.opts > > > > On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Windows XP SP 2 > > > > ruby 1.8.5 > > > > > gems: > > > > rails 1.2.3 > > > > rake 0.7.3 > > > > win32console 1.0.8 > > > > > plugins:rspec1.0.8 > > > > rspec_rails 1.0.8 > > > > > spec.opts: > > > > --colour > > > > --format > > > > progress > > > > --loadby > > > > mtime > > > > --reverse > > > > --drb > > > > > When I run "rake spec" or "ruby script/spec spec --color" this is the > > > > output: > > > > > D:\dev\project>rake spec > > > > (in D:/dev/project) > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > > Finished in 0.172 seconds > > > > > ←[32m11 examples, 0 failures←[0m > > > > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rich
2007-Aug-21 14:12 UTC
Re: RSpec: "--color" not working in spec.opts when combined with "--drb"
I haven''t tried autotest yet but I''d like to - it sounds awesome. I''ll try it tonight and see if I get any output. I also posted that workaround as a comment to the bug in rspec''s tracker. Hopefully they''ll fix it properly soon. On Aug 21, 9:15 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did notice that this fix will suppress any output when using > autotest. > > On Aug 20, 4:20 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Ok disregard the rake spec not connecting to spec_server thing - I > > wasn''t using it properly. > > > I found a workaround to get colour and drb working together: > > > Add "require ''Win32/Console/ANSI''" before the last line in your spec > > file and change the STDOUT parameter in the last line to $stdout. > > > So <project>/script/spec should look like this: > > > #!/usr/bin/env ruby > > $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../ > > vendor/plugins/rspec/lib")) > > require ''spec'' > > require ''Win32/Console/ANSI'' > > ::Spec::Runner::CommandLine.run(ARGV, STDERR, $stdout, true, true) > > > It''s not perfect. The first run will print the output to the console > > that spec_server is running in. All subsequent runs will print to the > > correct console though. I couldn''t figure out why it was doing this > > but the way it works is good enough for me. > > > On Aug 20, 9:29 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I''m not having an issue with "rake spec" not connecting to > > > spec_sever. > > > > Could it be an issue with Vista? > > > > On Aug 18, 7:18 pm, Rich <richpoir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''m having the same problem. Also, "rake spec" doesn''t connect to my > > > > running spec_server, but "ruby script/spec spec/models --drb" does. Do > > > > you have that this problem too? > > > > > I''m running: > > > > Vista > > > > ruby 1.8.6 > > > > rails 1.2.3 > > > > rake 0.7.3 > > > > win32console 1.0.8 > > > > rspec 1.0.8. > > > > same spec.opts > > > > > On Aug 18, 10:16 am, Hardbap <hard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Windows XP SP 2 > > > > > ruby 1.8.5 > > > > > > gems: > > > > > rails 1.2.3 > > > > > rake 0.7.3 > > > > > win32console 1.0.8 > > > > > > plugins:rspec1.0.8 > > > > > rspec_rails 1.0.8 > > > > > > spec.opts: > > > > > --colour > > > > > --format > > > > > progress > > > > > --loadby > > > > > mtime > > > > > --reverse > > > > > --drb > > > > > > When I run "rake spec" or "ruby script/spec spec --color" this is the > > > > > output: > > > > > > D:\dev\project>rake spec > > > > > (in D:/dev/project) > > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > > ←[32m.←[0m←[32m.←[0m←[32m.←[0m > > > > > > Finished in 0.172 seconds > > > > > > ←[32m11 examples, 0 failures←[0m > > > > > > If I remove "--drb" from the spec.opts file it runs fine (but slower).--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---