tddium-preview 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tddium-preview (0.1.2)
4
+ tddium-preview (0.1.3)
5
5
  bundler
6
6
  highline
7
7
  json
data/README.rdoc CHANGED
@@ -1,23 +1,14 @@
1
1
  = tddium
2
2
 
3
- tddium takes the pain out of running Selenium testing in cloud.
3
+ tddium takes the pain out of Ruby TDD.
4
4
 
5
- It automatically starts private Amazon EC2 Instances, runs your test,
6
- collect results, and cleans up the EC2 resources it used so you only
7
- pay for what you use.
5
+ It automatically starts private Amazon EC2 Instances, runs your tests, collects
6
+ results, and cleans up the EC2 resources it used so you only pay for what you
7
+ use.
8
8
 
9
9
  == Getting Started
10
10
 
11
- 1. Install rvm (https://rvm.beginrescueend.com). As of this writing,
12
- version 1.2.x is supported but version 1.5.x is not.
13
-
14
- 2. Install ruby into your rvm and create a gemset
15
-
16
- 3. Install the tddium-preview gem into your new gemset
17
-
18
- 4. In your GIT repo run tddium suite to create a new suite
19
-
20
- 4. Run tddium spec to run your hosted tests
11
+ See http://www.tddium.com/support for more information.
21
12
 
22
13
  == Copyright
23
14
 
@@ -12,7 +12,7 @@ module TddiumConstant
12
12
  SLEEP_TIME_BETWEEN_POLLS = 2
13
13
  ENVIRONMENT = "production"
14
14
  SSH_FILE = "~/.ssh/id_rsa.pub"
15
- TEST_PATTERN = "**/*_spec.rb"
15
+ TEST_PATTERN = "spec/**/*_spec.rb"
16
16
  end
17
17
 
18
18
  module Git
@@ -60,12 +60,12 @@ module TddiumConstant
60
60
  end
61
61
 
62
62
  module Process
63
- TERMINATE_INSTRUCTION = "Ctrl-C to terminate the process"
63
+ TERMINATE_INSTRUCTION = "Press Ctrl-C to stop waiting. Tests will continue running."
64
64
  INTERRUPT = "Interrupted"
65
65
  STARTING_TEST = "Starting %s tests..."
66
66
  CHECK_TEST_STATUS = "Use 'tddium status' to check on pending jobs"
67
67
  FINISHED_TEST = "Finished in %s seconds"
68
- CHECK_TEST_REPORT = "You can check out the test report details at %s"
68
+ CHECK_TEST_REPORT = "Test report: %s"
69
69
  EXISTING_SUITE = "Current suite: %s"
70
70
  CREATING_SUITE = "Creating suite '%s'. This will take a few seconds."
71
71
  PASSWORD_CONFIRMATION_INCORRECT = "Password confirmation incorrect"
@@ -3,5 +3,5 @@ Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
5
  module TddiumVersion
6
- VERSION = "0.1.3"
6
+ VERSION = "0.1.4"
7
7
  end
data/lib/tddium.rb CHANGED
@@ -156,9 +156,11 @@ class Tddium < Thor
156
156
  end
157
157
 
158
158
  # Set test_pattern param
159
- test_pattern = options[:test_pattern]
160
159
  if current_suite_options["test_pattern"]
161
- say Text::Process::USING_PREVIOUS_TEST_PATTERN % test_pattern if test_pattern == current_suite_options["test_pattern"]
160
+ test_pattern = current_suite_options["test_pattern"]
161
+ say Text::Process::USING_PREVIOUS_TEST_PATTERN % test_pattern if options[:test_pattern] == current_suite_options["test_pattern"]
162
+ else
163
+ test_pattern = options[:test_pattern]
162
164
  end
163
165
 
164
166
  start_time = Time.now
@@ -228,7 +230,7 @@ class Tddium < Thor
228
230
  # Print out the result
229
231
  say ""
230
232
  say Text::Process::FINISHED_TEST % (Time.now - start_time)
231
- say "#{finished_tests.size} examples, #{test_statuses["failed"]} failures, #{test_statuses["error"]} errors, #{test_statuses["pending"]} pending"
233
+ say "#{finished_tests.size} tests, #{test_statuses["failed"]} failures, #{test_statuses["error"]} errors, #{test_statuses["pending"]} pending"
232
234
 
233
235
  # Save the spec options
234
236
  write_suite(current_suite_id, {"user_data_file" => user_data_file_path,
@@ -532,7 +534,7 @@ class Tddium < Thor
532
534
  end
533
535
 
534
536
  def write_tddium_to_gitignore
535
- content = File.read(Git::GITIGNORE)
537
+ content = File.exists?(Git::GITIGNORE) ? File.read(Git::GITIGNORE) : ''
536
538
  unless content.include?("#{tddium_file_name}\n")
537
539
  File.open(Git::GITIGNORE, "a") do |file|
538
540
  file.write("#{tddium_file_name}\n")
data/spec/tddium_spec.rb CHANGED
@@ -29,7 +29,7 @@ describe Tddium do
29
29
  SAMPLE_SESSION_ID = 1
30
30
  SAMPLE_SUITE_ID = 1
31
31
  SAMPLE_USER_ID = 1
32
- DEFAULT_TEST_PATTERN = "**/*_spec.rb"
32
+ DEFAULT_TEST_PATTERN = Tddium::Default::TEST_PATTERN
33
33
  CUSTOM_TEST_PATTERN = "**/cat_spec.rb"
34
34
  SAMPLE_SUITE_RESPONSE = {"repo_name" => SAMPLE_APP_NAME, "branch" => SAMPLE_BRANCH_NAME, "id" => SAMPLE_SUITE_ID, "ruby_version"=>SAMPLE_RUBY_VERSION, "git_repo_uri" => SAMPLE_GIT_REPO_URI}
35
35
  SAMPLE_SUITES_RESPONSE = {"suites" => [SAMPLE_SUITE_RESPONSE]}
@@ -724,26 +724,37 @@ describe Tddium do
724
724
 
725
725
  it_should_behave_like "sending the api key"
726
726
 
727
- context "default test pattern" do
728
- it "should POST the names of the file names extracted from the test_pattern parameter" do
729
- current_dir = Dir.pwd
730
- call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
731
- :tests => [{:test_name => "#{current_dir}/spec/cat_spec.rb"},
732
- {:test_name => "#{current_dir}/spec/dog_spec.rb"},
733
- {:test_name => "#{current_dir}/spec/mouse_spec.rb"}]})
734
- run_spec(tddium)
727
+ context "test pattern" do
728
+ context "default test pattern" do
729
+ it "should POST the names of the file names extracted from the test_pattern parameter" do
730
+ current_dir = Dir.pwd
731
+ call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
732
+ :tests => [{:test_name => "#{current_dir}/spec/cat_spec.rb"},
733
+ {:test_name => "#{current_dir}/spec/dog_spec.rb"},
734
+ {:test_name => "#{current_dir}/spec/mouse_spec.rb"}]})
735
+ run_spec(tddium)
736
+ end
735
737
  end
736
- end
737
738
 
738
- context "--test-pattern=#{CUSTOM_TEST_PATTERN}" do
739
- it "should POST the names of the file names extracted from the test_pattern parameter" do
740
- current_dir = Dir.pwd
741
- call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
742
- :tests => [{:test_name => "#{current_dir}/spec/cat_spec.rb"}]})
743
- run_spec(tddium, {:test_pattern=>CUSTOM_TEST_PATTERN})
739
+ context "--test-pattern=#{CUSTOM_TEST_PATTERN}" do
740
+ it "should POST the names of the file names extracted from the test_pattern parameter" do
741
+ current_dir = Dir.pwd
742
+ call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
743
+ :tests => [{:test_name => "#{current_dir}/spec/cat_spec.rb"}]})
744
+ run_spec(tddium, {:test_pattern=>CUSTOM_TEST_PATTERN})
745
+ end
744
746
  end
745
- end
746
747
 
748
+ context "remembered from last run" do
749
+ it "should POST the names of the file names extracted from the remembered test_pattern" do
750
+ tddium.stub(:current_suite_options).and_return({'test_pattern'=>CUSTOM_TEST_PATTERN})
751
+ current_dir = Dir.pwd
752
+ call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
753
+ :tests => [{:test_name => "#{current_dir}/spec/cat_spec.rb"}]})
754
+ run_spec(tddium)
755
+ end
756
+ end
757
+ end
747
758
 
748
759
  context "'POST #{Tddium::Api::Path::REGISTER_TEST_EXECUTIONS}' is successful" do
749
760
  before do
@@ -890,7 +901,7 @@ describe Tddium do
890
901
  end
891
902
 
892
903
  it "should save the spec options" do
893
- tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" => "**/*_spec.rb"})
904
+ tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" => DEFAULT_TEST_PATTERN})
894
905
  run_spec(tddium, {:max_parallelism => 3})
895
906
  end
896
907
 
@@ -1132,6 +1143,13 @@ describe Tddium do
1132
1143
  gitignore_file.should include(".tddium.test")
1133
1144
  gitignore_file.should include("something")
1134
1145
  end
1146
+
1147
+ it "it should create .gitignore with tddium if it doesn't exist" do
1148
+ FileUtils.rm_f(Tddium::Git::GITIGNORE)
1149
+ run_suite(tddium)
1150
+ gitignore_file = File.open(Tddium::Git::GITIGNORE) { |file| file.read }
1151
+ gitignore_file.should include(".tddium.test")
1152
+ end
1135
1153
  end
1136
1154
 
1137
1155
  context "passing no cli options" do
data/tddium.gemspec CHANGED
@@ -13,8 +13,13 @@ Gem::Specification.new do |s|
13
13
  s.authors = ["Solano Labs"]
14
14
  s.email = ["info@tddium.com"]
15
15
  s.homepage = "http://www.tddium.com/"
16
- s.summary = %q{tddium Hosted Testing}
17
- s.description = %q{tddium runs your rspec (and Selenium) tests in the cloud, in parallel!}
16
+ s.summary = %q{tddium Hosted Ruby Testing}
17
+ s.description = <<-EOF
18
+ tddium runs your rspec, cucumber, and test::unit tests in our managed
19
+ cloud environment. Tests run in parallel to save you time, and, if you use
20
+ Rails, tddium takes care of setting up fresh isolated DB instances for each test
21
+ instance. Tests can also access a limited set of private Selenium RC servers.
22
+ EOF
18
23
 
19
24
  s.rubyforge_project = "tddium"
20
25
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tddium-preview
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Solano Labs
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-02 00:00:00 -07:00
13
+ date: 2011-05-08 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -112,7 +112,12 @@ dependencies:
112
112
  version: "0"
113
113
  type: :development
114
114
  version_requirements: *id009
115
- description: tddium runs your rspec (and Selenium) tests in the cloud, in parallel!
115
+ description: |
116
+ tddium runs your rspec, cucumber, and test::unit tests in our managed
117
+ cloud environment. Tests run in parallel to save you time, and, if you use
118
+ Rails, tddium takes care of setting up fresh isolated DB instances for each test
119
+ instance. Tests can also access a limited set of private Selenium RC servers.
120
+
116
121
  email:
117
122
  - info@tddium.com
118
123
  executables:
@@ -164,7 +169,7 @@ rubyforge_project: tddium
164
169
  rubygems_version: 1.5.2
165
170
  signing_key:
166
171
  specification_version: 3
167
- summary: tddium Hosted Testing
172
+ summary: tddium Hosted Ruby Testing
168
173
  test_files:
169
174
  - spec/spec_helper.rb
170
175
  - spec/tddium_spec.rb