infinity_test 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,15 @@ infinity_test do
4
4
 
5
5
  use :rubies => ['1.8.7', '1.9.2', 'jruby', 'ree', 'rbx'], :gemset => 'infinity_test', :test_framework => :rspec
6
6
 
7
+ # Maybe with block is better ...
8
+ #
9
+ # use do
10
+ # rubies = %w(1.8.7 1.9.2 jruby ree rbx)
11
+ # gemset = 'infinity_test'
12
+ # test_framework = :rspec
13
+ # application_framework = :rails
14
+ # end
15
+
7
16
  heuristics do
8
17
  add '^lib/infinity_test/dependencies.rb' do |file|
9
18
  run :all => :files
data/Rakefile CHANGED
@@ -17,8 +17,8 @@ POST_MESSAGE = <<-POST_INSTALL_MESSAGE
17
17
  #{ '-' * 80}
18
18
  T O I N F I N I T Y A N D B E Y O N D !!!
19
19
 
20
- The Infinity uses the awesome RVM to run.
21
- If you don't have the RVM installed, stop what you doing =p.
20
+ Infinity Test uses the awesome RVM to run.
21
+ If you don't have RVM installed, stop what you're doing =p.
22
22
  RVM Installation Instructions:
23
23
  http://rvm.beginrescueend.com/rvm/install/
24
24
  And don't forget to see how you can customize Infinity Test here:
@@ -34,8 +34,8 @@ begin
34
34
  require 'jeweler'
35
35
  Jeweler::Tasks.new do |gemspec|
36
36
  gemspec.name = "infinity_test"
37
- gemspec.summary = "Continuous testing and a flexible alternative to Autotest using watchr and RVM"
38
- gemspec.description = "Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with Rspec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration."
37
+ gemspec.summary = "Continuous testing and a flexible alternative to Autotest using Watchr and RVM"
38
+ gemspec.description = "Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with RSpec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration."
39
39
  gemspec.email = "tomasdestefi@gmail.com"
40
40
  gemspec.homepage = "http://github.com/tomas-stefano/infinity_test"
41
41
  gemspec.authors = ["Tomas D'Stefano"]
@@ -1,24 +1,24 @@
1
1
  # Infinity Test
2
2
 
3
-
4
- Infinity Test is a continuous testing library and a flexible alternative to Autotest,
5
- using the awesome Watchr library with Rspec, Test::Unit, Bacon and with RVM funcionality,
6
- giving the possibility to test with all <b>Rubies</b> that you have in your RVM configuration.
3
+ Infinity Test is a continuous testing library and a flexible alternative to
4
+ Autotest, using the awesome Watchr library with RSpec, Test::Unit, Bacon and
5
+ with RVM functionality, giving the possibility to test with all Ruby versions
6
+ that you have in your RVM configuration.
7
7
 
8
8
  ## To Infinity and Beyond!
9
9
 
10
10
  <div style="padding:2px; border:1px solid silver; float:right; margin:0 0 1em 2em; background:white">
11
- <img src="http://github.com/tomas-stefano/infinity_test/raw/master/buzz_images/to_infinity_and_beyond.png" alt="Infinity Test" />
12
- <p style="text-align:center"> Photo taken by <a href="http://www.mixed-metaphor.org/fan/buzz/" title="buzz-light-year"> this site </a></p>
11
+ <img src="https://github.com/tomas-stefano/infinity_test/raw/master/buzz_images/to_infinity_and_beyond.png" alt="Infinity Test" />
12
+ <p style="text-align:center">Photo taken from <a href="http://www.mixed-metaphor.org/fan/buzz/" title="buzz-light-year">this site</a></p>
13
13
  </div>
14
14
 
15
15
  ## Install
16
16
 
17
- gem install infinity_test
17
+ gem install infinity_test
18
18
 
19
- ## Running Tests only in one ruby
19
+ ## Running Tests with the current Ruby
20
20
 
21
- With Rspec:
21
+ With RSpec:
22
22
 
23
23
  infinity_test --rspec
24
24
 
@@ -30,9 +30,9 @@ With Bacon:
30
30
 
31
31
  infinity_test --bacon
32
32
 
33
- ## Running Tests with many Rubies
33
+ ## Running Tests with multiple Rubies
34
34
 
35
- With Rspec:
35
+ With RSpec:
36
36
 
37
37
  infinity_test --rspec --rubies=1.8.7,jruby,1.9.2,ree
38
38
 
@@ -44,11 +44,14 @@ Or with bacon:
44
44
 
45
45
  infinity_test --bacon --rubies=1.8.7,ree,1.9.2
46
46
 
47
- <b>And you are ready to Test with all ruby versions your Rspec or Test::Unit Suite with Autotest-like Behavior.</b>
47
+ You can pass arguments to specific versions of Ruby with a '+' character:
48
+
49
+ infinity_test --rspec --rubies=jruby+"J-cp bar/whisky-in-the.jar:."
48
50
 
49
- ## Running Tests with Rails (only in master branch!)
51
+ **Now you are ready to run your test suite against all Ruby versions with
52
+ Autotest-like behavior.**
50
53
 
51
- With Rails:
54
+ ## Running Tests with Rails
52
55
 
53
56
  infinity_test --rails
54
57
 
@@ -56,65 +59,87 @@ With Rails:
56
59
 
57
60
  ### Simple Domain Specific Language for Infinity Test file
58
61
 
59
- If you don't set all the time the rubies that you want, test framework that you want, notifications that you want,
60
- you can write some code that infinity_test understand.
61
-
62
- So create the global file or project file called:
62
+ If you'd rather not constantly specify which versions of Ruby to use, or the
63
+ testing framework to use, or which notifications you want to receive, you can
64
+ specify those options one time in an `.infinity_test` file.
63
65
 
64
- ~/.infinity_test or .infinity_test
66
+ You can create this file in your `$HOME` directory to be used globally across
67
+ all projects, or you can specify the options per-project in the project's root
68
+ folder:
65
69
 
66
- infinity_test do
70
+ # ~/.infinity_test or .infinity_test
67
71
 
68
- notifications :growl do
69
- show_images :mode => :mario_bros
70
- end
72
+ infinity_test do
73
+ notifications :growl do
74
+ show_images :mode => :mario_bros
75
+ end
71
76
 
72
- use :rubies => %w(1.9.1 jruby 1.9.2 ree), :test_framework => :rspec
77
+ use :rubies => %w(1.9.1 jruby 1.9.2 ree), :test_framework => :rspec
73
78
 
74
- before(:each_ruby) do |environment|
75
- # ...
76
- end
79
+ use :specific_options => {'jruby' => 'J-cp bar/whisky-in-the.jar:.'}
77
80
 
78
- after(:each_ruby) do |environment|
79
- # ...
80
- end
81
+ before(:each_ruby) do |environment|
82
+ # ...
83
+ end
81
84
 
82
- before_run do
83
- clear :terminal
84
- end
85
+ after(:each_ruby) do |environment|
86
+ # ...
87
+ end
85
88
 
86
- after_run do
87
- # ...
88
- end
89
+ before_run do
90
+ clear :terminal
91
+ end
89
92
 
90
- heuristics('my_pattern') do |file|
91
- # ...
92
- end
93
+ after_run do
94
+ # ...
95
+ end
93
96
 
94
- replace_patterns do |application|
95
- # ...
96
- end
97
+ heuristics('my_pattern') do |file|
98
+ # ...
99
+ end
97
100
 
101
+ replace_patterns do |application|
102
+ # ...
98
103
  end
104
+ end
99
105
 
100
106
  ## Customize the .infinity_test file
101
107
 
102
- #### If you want to customize and understand the .infinity_test file, <a href='http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test'>Read this Page</a>
108
+ If you want to customize and understand the .infinity_test file, [read this
109
+ page](http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test).
103
110
 
104
111
  # Color in RSpec
105
112
 
106
- ### Put this in your <b>.rspec</b> file:
113
+ ### Put this in your .rspec file:
114
+
115
+ In RSpec 2.2.0:
116
+
117
+ --color
118
+ --tty
119
+
120
+ In RSpec 2.1.0:
107
121
 
108
122
  --color
109
123
  --autotest
110
124
 
125
+ In RSpec 1.3, use the **spec.opts** file:
126
+
127
+ --color
128
+ --autospec
129
+
130
+ **Note: These options will be the defaults in a future version of Infinity Test**
131
+
132
+ ### Future
133
+
134
+ * Add support for focus files (run failed results and then run all tests if those pass, etc.)
135
+
111
136
  ## You Like it the Idea?
112
137
 
113
- <b>So make a fork and start contributing =].</b>
138
+ So make a fork and start contributing =].
114
139
 
115
140
  ## You have a Feature request or Fix?
116
141
 
117
- <b>Contact me in Github and let's talk! =] </b>
142
+ Contact me on GitHub, or Twitter ([@tomas_stefano](https://twitter.com/tomas_stefano)) and let's talk! =]
118
143
 
119
144
  # Acknowledgments
120
145
 
@@ -1,12 +1,24 @@
1
1
  Future
2
2
  ======
3
3
 
4
- - Support Rails apps
4
+ - Create a Rails Generator on the fly that receives some arguments and create a ./.infinity_test file
5
5
  - Support Cucumber
6
- - Make Infinity Test support Rubinius (I tried to run without success - Investigate this!)
7
6
  - Run with failed tests (Focus mode!!)
7
+ - Put some methods in the configuration file like: #all_tests_pass?, #all_tests_pass_in_ruby? like:
8
+
9
+ Example:
10
+
11
+ after(:all) do
12
+ if all_tests_pass?
13
+ # do something
14
+ end
15
+
16
+ if all_tests_pass_in_ruby?('1.8.7')
17
+ # do something
18
+ end
19
+ end
8
20
 
9
21
  Bugs
10
22
  ====
11
23
 
12
- - Coloring the output (maybe using RedGreen)
24
+ - Coloring the output with Test::Unit (maybe using RedGreen)
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 0
4
- :patch: 2
4
+ :patch: 3
5
5
  :build:
@@ -5,13 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{infinity_test}
8
- s.version = "1.0.2"
8
+ s.version = "1.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tomas D'Stefano"]
12
- s.date = %q{2010-11-16}
13
- s.default_executable = %q{infinity_test}
14
- s.description = %q{Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with Rspec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration.}
12
+ s.date = %q{2011-05-30}
13
+ s.description = %q{Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with RSpec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration.}
15
14
  s.email = %q{tomasdestefi@gmail.com}
16
15
  s.executables = ["infinity_test"]
17
16
  s.extra_rdoc_files = [
@@ -128,8 +127,8 @@ Gem::Specification.new do |s|
128
127
  --------------------------------------------------------------------------------
129
128
  T O I N F I N I T Y A N D B E Y O N D !!!
130
129
 
131
- The Infinity uses the awesome RVM to run.
132
- If you don't have the RVM installed, stop what you doing =p.
130
+ Infinity Test uses the awesome RVM to run.
131
+ If you don't have RVM installed, stop what you're doing =p.
133
132
  RVM Installation Instructions:
134
133
  http://rvm.beginrescueend.com/rvm/install/
135
134
  And don't forget to see how you can customize Infinity Test here:
@@ -142,8 +141,8 @@ Gem::Specification.new do |s|
142
141
  }
143
142
  s.rdoc_options = ["--charset=UTF-8"]
144
143
  s.require_paths = ["lib"]
145
- s.rubygems_version = %q{1.3.7}
146
- s.summary = %q{Continuous testing and a flexible alternative to Autotest using watchr and RVM}
144
+ s.rubygems_version = %q{1.7.2}
145
+ s.summary = %q{Continuous testing and a flexible alternative to Autotest using Watchr and RVM}
147
146
  s.test_files = [
148
147
  "spec/factories/buzz/lib/buzz.rb",
149
148
  "spec/factories/buzz/spec/buzz_spec.rb",
@@ -178,7 +177,6 @@ Gem::Specification.new do |s|
178
177
  ]
179
178
 
180
179
  if s.respond_to? :specification_version then
181
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
182
180
  s.specification_version = 3
183
181
 
184
182
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -49,6 +49,7 @@ module InfinityTest
49
49
  def setup!(options)
50
50
  config.use(
51
51
  :rubies => (options[:rubies] || rubies),
52
+ :specific_options => (options[:specific_options] || specific_options),
52
53
  :test_framework => (options[:test_framework] || config.test_framework),
53
54
  :app_framework => (options[:app_framework] || config.app_framework),
54
55
  :cucumber => options[:cucumber],
@@ -117,6 +118,12 @@ module InfinityTest
117
118
  def rubies
118
119
  config.rubies
119
120
  end
121
+
122
+ # Return the rubies specific options in the config file or the command line
123
+ #
124
+ def specific_options
125
+ config.specific_options
126
+ end
120
127
 
121
128
  # Return true if verbose mode is on
122
129
  # Verbose mode is false as default
@@ -318,11 +325,11 @@ module InfinityTest
318
325
  def setting_test_framework
319
326
  case config.test_framework
320
327
  when :rspec
321
- Rspec.new :rubies => rubies
328
+ Rspec.new :rubies => rubies, :specific_options => specific_options
322
329
  when :test_unit
323
- TestUnit.new :rubies => rubies
330
+ TestUnit.new :rubies => rubies, :specific_options => specific_options
324
331
  when :bacon
325
- Bacon.new :rubies => rubies
332
+ Bacon.new :rubies => rubies, :specific_options => specific_options
326
333
  end
327
334
  end
328
335
 
@@ -6,21 +6,19 @@ module InfinityTest
6
6
  #
7
7
  #
8
8
  def construct_command(options)
9
- binary_name, ruby_version, command, file, environment = resolve_options(options)
10
-
9
+ binary_name, ruby_version, command, file, environment, specific_options = resolve_options(options)
10
+
11
11
  unless have_binary?(binary_name) || options[:skip_binary?]
12
12
  print_message(binary_name, ruby_version)
13
-
14
13
  else
15
14
  command = "#{command} #{decide_files(file)}"
16
- rvm_ruby_version = "rvm #{ruby_version} ruby"
17
-
18
- if application.have_gemfile? and not application.skip_bundler?
15
+ rvm_ruby_version = "rvm #{ruby_version} ruby #{specific_options}"
16
+
17
+ if application.have_gemfile? and not application.skip_bundler?
19
18
  run_with_bundler!(rvm_ruby_version, command, environment)
20
19
  else
21
20
  run_without_bundler!(rvm_ruby_version, command)
22
21
  end
23
-
24
22
  end
25
23
  end
26
24
 
@@ -30,7 +28,7 @@ module InfinityTest
30
28
  unless have_binary?(bundle_binary)
31
29
  print_message('bundle', environment.expanded_name)
32
30
  else
33
- %{#{rvm_ruby_version} #{bundle_binary} exec #{command}}
31
+ %{#{bundle_binary} exec #{rvm_ruby_version} #{command}}
34
32
  end
35
33
  end
36
34
 
@@ -59,8 +57,9 @@ module InfinityTest
59
57
  load_path = %{-I"#{options[:load_path]}"} if options[:load_path]
60
58
  environment = options[:environment]
61
59
  file = options[:file]
60
+ specific_options = options[:specific_options]
62
61
  command = [ binary_name, load_path].compact.join(' ')
63
- [binary_name, ruby_version, command, file, environment]
62
+ [binary_name, ruby_version, command, file, environment, specific_options]
64
63
  end
65
64
 
66
65
  end
@@ -1,7 +1,7 @@
1
1
  module InfinityTest
2
2
  class Configuration
3
3
 
4
- SUPPORTED_FRAMEWORKS = [:growl, :lib_notify] # :snarl, :lib_notify
4
+ SUPPORTED_FRAMEWORKS = [:growl, :lib_notify]
5
5
 
6
6
  attr_accessor :notification_framework,
7
7
  :sucess_image, :failure_image, :pending_image,
@@ -9,7 +9,7 @@ module InfinityTest
9
9
  :exceptions_to_ignore, :cucumber,
10
10
  :before_callback, :before_each_ruby_callback, :before_environment_callback,
11
11
  :after_callback, :after_each_ruby_callback,
12
- :verbose
12
+ :verbose, :specific_options
13
13
 
14
14
  IMAGES_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'images'))
15
15
 
@@ -107,6 +107,7 @@ module InfinityTest
107
107
  def use(options={})
108
108
  rubies = options[:rubies]
109
109
  @rubies = (rubies.is_a?(Array) ? rubies.join(',') : rubies) || []
110
+ @specific_options = options[:specific_options]
110
111
  @test_framework = options[:test_framework] || @test_framework
111
112
  @app_framework = options[:app_framework] || @app_framework
112
113
  @verbose = options[:verbose] || @verbose
@@ -196,7 +197,10 @@ module InfinityTest
196
197
  #
197
198
  #
198
199
  def before(hook=:all, &block)
199
- setting_callback(hook, :all => :@before_callback, :each_ruby => :@before_each_ruby_callback, :env => :@before_environment_callback, &block)
200
+ setting_callback(hook,
201
+ :all => :@before_callback,
202
+ :each_ruby => :@before_each_ruby_callback,
203
+ :env => :@before_environment_callback, &block)
200
204
  end
201
205
 
202
206
  # Callback method to handle before or after all run and for each ruby too!
@@ -19,13 +19,13 @@ module InfinityTest
19
19
  end
20
20
 
21
21
  def parse_rspec(options)
22
- options.on('--rspec', 'Test Framework: Rspec') do
22
+ options.on('--rspec', 'Test Framework: RSpec') do
23
23
  self[:test_framework] = :rspec
24
24
  end
25
25
  end
26
26
 
27
27
  def parse_test_unit(options)
28
- options.on('--test-unit', 'Test Framework: Test Unit [Default]') do
28
+ options.on('--test-unit', 'Test Framework: Test Unit (Default)') do
29
29
  self[:test_framework] = :test_unit
30
30
  end
31
31
  end
@@ -37,13 +37,21 @@ module InfinityTest
37
37
  end
38
38
 
39
39
  def parse_rubies(options)
40
- options.on('--rubies=rubies', 'Specify the Ruby Versions for Testing with many Rubies') do |versions|
41
- self[:rubies] = versions
40
+ options.on('--rubies=rubies', 'Specify Ruby version(s) to test against') do |versions|
41
+ rubies = []
42
+ self[:specific_options] = {}
43
+ versions.split(",").each do |r|
44
+ rubie = r.split('+')[0]
45
+ params = r.split('+')[1]
46
+ self[:specific_options][rubie] = params
47
+ rubies << rubie
48
+ end
49
+ self[:rubies] = rubies.join(',')
42
50
  end
43
51
  end
44
52
 
45
53
  def parse_verbose(options)
46
- options.on('--verbose', 'The Infinity Test dont print the commands', 'To print the commands set this option!') do
54
+ options.on('--verbose', 'Print commands before executing them') do
47
55
  self[:verbose] = true
48
56
  end
49
57
  end
@@ -67,23 +75,22 @@ module InfinityTest
67
75
  # end
68
76
 
69
77
  def parse_patterns(options)
70
- options.on('--heuristics', 'Show all the Default Patterns and added by #heuristics method and EXIT.') do
78
+ options.on('--heuristics', 'Show all defined heuristics and exit') do
71
79
  self[:show_heuristics?] = true
72
80
  end
73
81
  end
74
82
 
75
83
  def parse_bundler(options)
76
- options.on('--skip-bundler', "InfinityTest try to use bundler if Gemfile is present. If you don't want to use this convention, set this option.") do
84
+ options.on('--skip-bundler', "Bypass Infinity Test's Bundler support, even if a Gemfile is present") do
77
85
  self[:skip_bundler?] = true
78
86
  end
79
87
  end
80
-
88
+
81
89
  def parse_version(options)
82
90
  options.on("--version", "Show version and exit") do
83
91
  puts InfinityTest.version
84
92
  exit
85
93
  end
86
94
  end
87
-
88
95
  end
89
96
  end
@@ -6,11 +6,12 @@ module InfinityTest
6
6
 
7
7
  binary :bundle
8
8
 
9
- attr_accessor :application, :message, :rubies, :test_pattern
9
+ attr_accessor :application, :message, :rubies, :test_pattern, :specific_options
10
10
 
11
11
  def initialize(options={})
12
12
  @application = InfinityTest.application
13
13
  @rubies = options[:rubies] || []
14
+ @specific_options = options[:specific_options] || {}
14
15
  end
15
16
 
16
17
  # Return all the files match by test_pattern
@@ -106,4 +107,4 @@ module InfinityTest
106
107
  end
107
108
 
108
109
  end
109
- end
110
+ end
@@ -27,11 +27,13 @@ module InfinityTest
27
27
  environments do |environment, ruby_version|
28
28
  rspec_binary = search_rspec_two(environment)
29
29
  rspec_binary = search_rspec_one(environment) unless have_binary?(rspec_binary)
30
+ specific_options = @specific_options[ruby_version]
30
31
  commands[ruby_version] = construct_command(
31
32
  :for => ruby_version,
32
33
  :binary => rspec_binary,
33
34
  :file => file,
34
- :environment => environment)
35
+ :environment => environment,
36
+ :specific_options => specific_options)
35
37
  end
36
38
  commands
37
39
  end
@@ -20,6 +20,10 @@ module InfinityTest
20
20
  application_with(:rubies => ['1.9.2']).rubies.should == '1.9.2'
21
21
  end
22
22
 
23
+ it "should return the specific options in the config" do
24
+ application_with(:specific_options => {'v-1' => '-o'}).specific_options.should == {'v-1' => '-o'}
25
+ end
26
+
23
27
  it "should return the watchr script instance" do
24
28
  application_with_rspec.watchr.should be_instance_of(Watchr::Script)
25
29
  end
@@ -194,13 +198,19 @@ module InfinityTest
194
198
 
195
199
  it "should pass all the rubies for the test_framework TestUnit" do
196
200
  @application.config.use :test_framework => :test_unit, :rubies => ['1.9.1', '1.9.2']
197
- InfinityTest::TestLibrary::TestUnit.should_receive(:new).with(:rubies => '1.9.1,1.9.2')
201
+ InfinityTest::TestLibrary::TestUnit.should_receive(:new).with(:rubies => '1.9.1,1.9.2', :specific_options=>nil)
198
202
  @application.test_framework
199
203
  end
200
204
 
201
205
  it "should pass all the rubies for the test_framework Rspec" do
202
206
  @application.config.use :test_framework => :rspec, :rubies => ['1.9.1', '1.9.2']
203
- InfinityTest::TestLibrary::Rspec.should_receive(:new).with(:rubies => '1.9.1,1.9.2')
207
+ InfinityTest::TestLibrary::Rspec.should_receive(:new).with(:rubies => '1.9.1,1.9.2', :specific_options=>nil)
208
+ @application.test_framework
209
+ end
210
+
211
+ it "should pass specific options for the test_framework Rspec" do
212
+ @application.config.use :test_framework => :rspec, :rubies => ['1.9.1', 'jruby'], :specific_options => {'jruby' => '-J-cp :.'}
213
+ InfinityTest::TestLibrary::Rspec.should_receive(:new).with(:rubies => '1.9.1,jruby', :specific_options => {'jruby' => '-J-cp :.'})
204
214
  @application.test_framework
205
215
  end
206
216
 
@@ -97,6 +97,11 @@ module InfinityTest
97
97
  config.rubies.should be == '1.9.1,1.9.2'
98
98
  end
99
99
 
100
+ it "should set ruby specific options" do
101
+ config.use :specific_options => {'v-1' => '-o'}
102
+ config.specific_options.should == {'v-1' => '-o'}
103
+ end
104
+
100
105
  it "should set the test unit when not set the test framework" do
101
106
  config.use
102
107
  config.test_framework.should equal :test_unit
@@ -45,6 +45,26 @@ module InfinityTest
45
45
  @options[:rubies].should eql '1.8.7-p249,1.9.1-p378'
46
46
  end
47
47
 
48
+ it "should parse --rvm-versions with particual options" do
49
+ parse_options('--rubies=jruby-6.6.6+-J-cp bar/whisky-in-the.jar:.')
50
+ @options[:rubies].should eql 'jruby-6.6.6'
51
+ end
52
+
53
+ it "should parse --rvm-versions specific options" do
54
+ parse_options('--rubies=jruby-6.6.6+-J-cp bar/whisky-in-the.jar:.')
55
+ @options[:specific_options].should == {'jruby-6.6.6' => '-J-cp bar/whisky-in-the.jar:.'}
56
+ end
57
+
58
+ it "should parse rubies with multiples specific options" do
59
+ parse_options('--rubies=jruby-1+-J-cp :.,jruby-2+-J-cp,1.9.2,jruby3+-J-cp :.')
60
+ @options[:rubies].should == 'jruby-1,jruby-2,1.9.2,jruby3'
61
+ end
62
+
63
+ it "should parse particular options with multiples specific options" do
64
+ parse_options('--rubies=jruby-1+-J-cp :.,jruby-2+-J-cp,1.9.2,jruby3+-J-cp :.')
65
+ @options[:specific_options].should == {'jruby-1'=>'-J-cp :.','jruby-2'=>'-J-cp','1.9.2'=>nil,'jruby3'=>'-J-cp :.'}
66
+ end
67
+
48
68
  it "should parse --verbose" do
49
69
  parse_options('--verbose')
50
70
  @options[:verbose].should be_true
@@ -17,6 +17,10 @@ module InfinityTest
17
17
  Rspec.new(:rubies => 'jruby,ree').rubies.should be == 'jruby,ree'
18
18
  end
19
19
 
20
+ it "should set specific options" do
21
+ Rspec.new(:specific_options => {'jruby' => '-J-cp bar/whisky-in-the.jar:.'}).specific_options.should == {'jruby' => '-J-cp bar/whisky-in-the.jar:.'}
22
+ end
23
+
20
24
  it "rubies should be empty when not have rubies" do
21
25
  Rspec.new.rubies.should be_empty
22
26
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infinity_test
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 2
9
- version: 1.0.2
4
+ prerelease:
5
+ version: 1.0.3
10
6
  platform: ruby
11
7
  authors:
12
8
  - Tomas D'Stefano
@@ -14,8 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-11-16 00:00:00 -02:00
18
- default_executable: infinity_test
13
+ date: 2011-05-30 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: watchr
@@ -25,9 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 7
31
23
  version: "0.7"
32
24
  type: :runtime
33
25
  version_requirements: *id001
@@ -39,10 +31,6 @@ dependencies:
39
31
  requirements:
40
32
  - - ">="
41
33
  - !ruby/object:Gem::Version
42
- segments:
43
- - 1
44
- - 1
45
- - 0
46
34
  version: 1.1.0
47
35
  type: :runtime
48
36
  version_requirements: *id002
@@ -54,10 +42,6 @@ dependencies:
54
42
  requirements:
55
43
  - - ">="
56
44
  - !ruby/object:Gem::Version
57
- segments:
58
- - 2
59
- - 0
60
- - 1
61
45
  version: 2.0.1
62
46
  type: :development
63
47
  version_requirements: *id003
@@ -69,14 +53,10 @@ dependencies:
69
53
  requirements:
70
54
  - - ">="
71
55
  - !ruby/object:Gem::Version
72
- segments:
73
- - 1
74
- - 4
75
- - 0
76
56
  version: 1.4.0
77
57
  type: :development
78
58
  version_requirements: *id004
79
- description: Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with Rspec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration.
59
+ description: Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with RSpec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration.
80
60
  email: tomasdestefi@gmail.com
81
61
  executables:
82
62
  - infinity_test
@@ -189,11 +169,10 @@ files:
189
169
  - spec/infinity_test/test_library/test_unit_spec.rb
190
170
  - spec/infinity_test_spec.rb
191
171
  - spec/spec_helper.rb
192
- has_rdoc: true
193
172
  homepage: http://github.com/tomas-stefano/infinity_test
194
173
  licenses: []
195
174
 
196
- post_install_message: "\n --------------------------------------------------------------------------------\n T O I N F I N I T Y A N D B E Y O N D !!!\n\n The Infinity uses the awesome RVM to run.\n If you don't have the RVM installed, stop what you doing =p.\n RVM Installation Instructions:\n http://rvm.beginrescueend.com/rvm/install/\n And don't forget to see how you can customize Infinity Test here:\n http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test\n\n Happy Coding! :)\n\n --------------------------------------------------------------------------------\n\n"
175
+ post_install_message: "\n --------------------------------------------------------------------------------\n T O I N F I N I T Y A N D B E Y O N D !!!\n\n Infinity Test uses the awesome RVM to run.\n If you don't have RVM installed, stop what you're doing =p.\n RVM Installation Instructions:\n http://rvm.beginrescueend.com/rvm/install/\n And don't forget to see how you can customize Infinity Test here:\n http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test\n\n Happy Coding! :)\n\n --------------------------------------------------------------------------------\n\n"
197
176
  rdoc_options:
198
177
  - --charset=UTF-8
199
178
  require_paths:
@@ -203,24 +182,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
182
  requirements:
204
183
  - - ">="
205
184
  - !ruby/object:Gem::Version
206
- segments:
207
- - 0
208
185
  version: "0"
209
186
  required_rubygems_version: !ruby/object:Gem::Requirement
210
187
  none: false
211
188
  requirements:
212
189
  - - ">="
213
190
  - !ruby/object:Gem::Version
214
- segments:
215
- - 0
216
191
  version: "0"
217
192
  requirements: []
218
193
 
219
194
  rubyforge_project:
220
- rubygems_version: 1.3.7
195
+ rubygems_version: 1.7.2
221
196
  signing_key:
222
197
  specification_version: 3
223
- summary: Continuous testing and a flexible alternative to Autotest using watchr and RVM
198
+ summary: Continuous testing and a flexible alternative to Autotest using Watchr and RVM
224
199
  test_files:
225
200
  - spec/factories/buzz/lib/buzz.rb
226
201
  - spec/factories/buzz/spec/buzz_spec.rb