Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Continuous testing and a alternative to Autotest using Watchr and RVM (And It's possible to test with all Rubies on your machine with Autotest-like behavior and more!!! w00t!! )
Ruby
Tree: 0becfb84af

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
buzz_images
features
images
lib
spec
.gitignore
.infinity_test
.rspec
.rvmrc
Gemfile
Gemfile.lock
History.markdown
LICENSE.txt
Rakefile
Readme.markdown
TODO.markdown
Tasks
VERSION.yml
infinity_test.gemspec

Readme.markdown

Infinity Test

Infinity Test is a continuous testing library and a flexible alternative to Autotest, using the awesome Watchr library with Rspec, Test::Unit, Bacon and with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration.

To Infinity and Beyond!

Infinity Test

Photo taken by this site

Install

 gem install infinity_test

Running Tests only in one ruby

With Rspec:

infinity_test --rspec

With Test::Unit:

infinity_test --test-unit

With Bacon:

infinity_test --bacon

Running Tests with many Rubies

With Rspec:

infinity_test --rspec --rubies=1.8.7,jruby,1.9.2,ree

Or with Test::Unit:

infinity_test --test-unit --rubies=1.8.7,jruby,ree,1.9.2

Or with bacon:

infinity_test --bacon --rubies=1.8.7,ree,1.9.2

You can pass specific arguments for a rubie with "+" character like

infinity_test --rspec --rubies=jruby+"J-cp bar/whisky-in-the.jar:."

And you are ready to Test with all ruby versions your Rspec or Test::Unit Suite with Autotest-like Behavior.

Running Tests with Rails

With Rails:

infinity_test --rails

Configuration file

Simple Domain Specific Language for Infinity Test file

If you don't set all the time the rubies that you want, test framework that you want, notifications that you want, you can write some code that infinity_test understand.

So create the global file or project file called:

  ~/.infinity_test or .infinity_test

  infinity_test do

    notifications :growl do
      show_images :mode => :mario_bros
    end

    use :rubies => %w(1.9.1 jruby 1.9.2 ree), :test_framework => :rspec

    use :specific_options => {'jruby' => 'J-cp bar/whisky-in-the.jar:.'}

    before(:each_ruby) do |environment|
      # ...
    end

    after(:each_ruby) do |environment|
      # ...
    end

    before_run do
      clear :terminal
    end

    after_run do
      # ...
    end

    heuristics('my_pattern') do |file|
      # ...
    end

    replace_patterns do |application|
      # ...
    end

  end

Customize the .infinity_test file

If you want to customize and understand the .infinity_test file, Read this Page

Color in RSpec

Put this in your .rspec file:

In RSpec 2.2.0:

--color
--tty

In RSpec 2.1.0:

--color
--autotest

In RSpec 1.3.0 in case you are using RSpec 1.3 => spec.opts file:

 --color
 --autospec

Obs.: I'll put this options as default in InfinityTest in a future version

Future

  • Make work with Focus files! (Run failed results and if pass run all , etc ...)

You Like it the Idea?

So make a fork and start contributing =].

You have a Feature request or Fix?

Contact me in Github/Twitter(@tomas_stefano) and let's talk! =]

Acknowledgments

  • Thanks to Mynyml and Watchr library.
  • Thanks to Waynee Seguin and the RVM.
Something went wrong with that request. Please try again.