Coder Social home page Coder Social logo

Comments (13)

grosser avatar grosser commented on July 19, 2024

did you try to use autospec ?

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024

I have no autospec bin. Because autospec was deprecated in rspec2.

from autotest.

grosser avatar grosser commented on July 19, 2024

can you try to narrow down the problem, e.g. find the most simple setup that does not work (empty rails project with just rspec 2 and one empty spec?)

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024
  • $ rails auto_test
    created new rails project
  • $ gvim Gemfile
    source 'http://rubygems.org'
    gem 'rails', '3.0.0.beta3'
    gem 'sqlite3-ruby', :require => 'sqlite3'
    group :test do
    gem 'rspec-rails', '>=2.0.0.beta.8'
    gem 'rspec', '>=2.0.0.beta.8'
    gem 'autotest-rails-pure'
    gem 'autotest-growl'
    end
  • $rails g rspec:install
  • $rails g rspec:model test
    create  spec/models/test_spec.rb
  • $autotest
    loading autotest/rails
    style: Rails

Instead of style: Rspec2

from autotest.

grosser avatar grosser commented on July 19, 2024

thanks, ill try this setup :)

from autotest.

grosser avatar grosser commented on July 19, 2024

if i add discover.rb with rails and rspec2 i get:

loading autotest/rails_rspec2
Error loading Autotest style autotest/rails_rspec2 (no such file to load -- autotest/rails_rspec2). Aborting.

But when i just add rspec2 it works with:

loading autotest/rspec2
style: Rspec2
/home/micha/.rvm/rubies/ree-1.8.7-2010.01/bin/ruby -rrubygems /home/micha/.rvm/gems/ree-1.8.7-2010.01/gems/rspec-core-2.0.0.beta.8/bin/rspec /apps/test/rspec2test/spec/xxx_spec.rb
.


Finished in 0.00029 seconds
1 example, 0 failures

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024

I try to use this setup:
$ cat autotest/discover.rb

Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }

And this:
$ cat autotest/discover.rb
Autotest.add_discovery { "rspec2" }

Same results. May be trouble with version of ruby? I see that you use REE 1.8.7, but in my setup Ruby: ruby 1.9.3dev (2010-05-08 trunk 27674) x86_64-linux

from autotest.

grosser avatar grosser commented on July 19, 2024

maybe:

  • try to uninstall autotest-rails, it adds a rails 'discover' too
  • try to add a "raise 'foo'" to your discover.rb to see if its loaded at all

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024

I had no autotest-rails installed. And I uninstalled autotest-rails-pure and modified Gemfile:

group :test do
gem 'rspec-rails', '>=2.0.0.beta.8'
gem 'rspec', '>=2.0.0.beta.8'
gem 'autotest'

gem 'autotest-rails-pure'

gem 'autotest-growl'
end

But this action had no effect.

$ cat autotest/discover.rb


Autotest.add_discovery { "rspec2" }
raise 'foo'
p 'dasdsadsa'

But it, as i could see, had no effect:


[f/usr/bin/ruby-svn -I.:lib:test -rubygems -e "['test/unit', 'test/unit/test_test.rb', 'test/test_helper.rb'].each { |f| require f }" | /usr/lib/ruby/gems/svn/gems/autotest-4.2.9/bin/unit_diff -u
Loaded suite -e
Started
EEEEEEE
Finished in 0.085949 seconds.

  1. Error:
    tests(ActionController::TestCase):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  2. Error:
    tests(ActionDispatch::IntegrationTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  3. Error:
    tests(ActionView::TestCase):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  4. Error:
    tests(ActiveRecord::TestCase):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  5. Error:
    tests(ActiveSupport::TestCase):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  6. Error:
    test_the_truth(TestTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
  7. Error:
    tests(TestTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tests: DELETE FROM "tests" WHERE 1=1
    7 tests, 0 assertions, 0 failures, 7 errors, 0 skips
    Test run options: --seed 40297
    Unable to map class ActionController::TestCase to a file
    Unable to map class ActionDispatch::IntegrationTest to a file
    Unable to map class ActionView::TestCase to a file
    Unable to map class ActiveRecord::TestCase to a file
    Unable to map class ActiveSupport::TestCase to a file
    Unable to map class TestTest to a file
    Unable to map class TestTest to a file

from autotest.

grosser avatar grosser commented on July 19, 2024

ahh got it, its a 1.9 problem, same at me now with 1.9.2, ill try to fix it asap :)

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024

That's great!
Sometimes I thought that it is only my bug :)

Good luck with your work!

from autotest.

grosser avatar grosser commented on July 19, 2024

ruby 1.9 has a great new bug feature: the current path is not in the load path...
4.2.10 is for you :)

from autotest.

petRUShka avatar petRUShka commented on July 19, 2024

Yahoo!!
$ autotest

loading autotest/cucumber_rails_rspec2
style: CucumberRailsRspec2

Thank you!
It works!

from autotest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.