jkutner / guard-jruby-rspec

RSpec on JRuby without the startup cost.
MIT License
62 stars 16 forks source link

Invalid Guardfile #15

Closed mattbeedle closed 11 years ago

mattbeedle commented 12 years ago

guard 'rspec' works fine, but when I change the Guardfile to guard 'jruby-rspec' then I get the following error:

guard start io/console not supported; tty will not be manipulated 10:07:16 - ERROR - Invalid Guardfile, original error is:

[#] wrong argument type Class (expected Module) 10:07:16 - ERROR - No guards found in Guardfile, please add at least one.

Here's my test and development gems:

group :development, :test do gem 'guard-jruby-rspec', platforms: [ :jruby ] gem 'rspec-cells' gem 'rspec-rails', '2.11.0' gem 'terminal-notifier-guard' gem 'tddium' end

group :test do gem 'capybara' gem 'capybara-webkit' gem 'database_cleaner' gem 'fabrication' gem 'faker' gem 'fakeweb' gem 'rb-fsevent' gem 'rspec-spies', '2.1.0' gem 'shoulda-matchers' gem 'timecop' end

Any ideas?

mattbeedle commented 12 years ago

oh, and here's my Guardfile:

guard 'jruby-rspec' do

watch(%r{^spec/.+_spec.rb$}) watch(%r{^lib/(.+).rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" }

Rails example

watch(%r{^app/(.+).rb$}) { |m| "spec/#{m[1]}_spec.rb" } watch(%r{^app/(.*)(.erb|.slim)$}) { |m| "spec/#{m[1]}#{m[2]}spec.rb" } watch(%r{^app/controllers/(.+)(controller).rb$}) { |m| ["spec/routing/#{m[1]}_routingspec.rb", "spec/#{m[2]}s/#{m[1]}#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } watch(%r{^spec/support/(.+).rb$}) { "spec" } watch('config/routes.rb') { "spec/routing" } watch('app/controllers/application_controller.rb') { "spec/controllers" }

Capybara request specs

watch(%r{^app/views/(.+)/.*.(erb|slim)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } end

rolfb commented 12 years ago

happening to me too.

almegeddon commented 12 years ago

Same here using

jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.7.0_06-b24 [darwin-x86_64]

and rails setup like @mattbeedle

jkutner commented 12 years ago

Can you folks verify that this is fixed?

almegeddon commented 11 years ago

I've verified that jruby guard starts successfully and runs the first pass of specs. Unfortunately an exception is thrown when making source changes:

[1] guard(main)> 09:55:56 - ERROR - Guard::JRubyRSpec failed to achieve its <run_on_changes>, exception was:
> [#] SyntaxError: /app/views/projects/new.html.erb:1: syntax error, unexpected tLT
mattbeedle commented 11 years ago

Sorry to take so long to reply, I switched to normal guard again and slow tests. I just tried this again now and can verify that it's fixed for me.